Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • austenn01 Friend
    #198242

    Hello,

    I want to add the Schema MircoData Code for LOGO to the header.php file (unless there is a better way to implement this?

    <div itemscope itemtype="http://schema.org/Organization">
    <img itemprop="logo" src="http://www.example.com/logo.png" />
    </div>

    Here is the logo code in the header.php of Purity III

    defined('_JEXEC') or die;

    // get params

    $sitename = $this->params->get('sitename');

    $slogan = $this->params->get('slogan', '');

    $logotype = $this->params->get('logotype', 'text');

    $logoimage = $logotype == 'image' ? $this->params->get('logoimage', 'templates/' . T3_TEMPLATE . '/images/logo.png') : '';

    $logoimgsm = ($logotype == 'image' && $this->params->get('enable_logoimage_sm', 0)) ? $this->params->get('logoimage_sm', '') : false;

    if (!$sitename) {

    $sitename = JFactory::getConfig()->get('sitename');

    }

    Can anyone advise how to add the Schema code for the template logo in JoomlArt templates (IE Purity III)???

    Nazario A Friend
    #537063

    @austenn01,

    Please open file: /templates/your_template_name/tpls/blocks/header.php then find and replace this code:


    <div class="logo logo-<?php echo $logotype ?>">
    <div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>
    </div>

    With:

    <div itemscope itemtype="http://schema.org/Organization">
    <img itemprop="logo" src="http://www.example.com/logo.png" />
    </div>

    Let me know if this helps

    austenn01 Friend
    #540564

    How would that work?

    You have asked me to repalce the entire logo code with the schema code…there is no styles, no code to link the logo to the ‘template logo’ that we upload via templates.

    You have basically just copied and pasted what I asked above.

    What you have asked me to do simply would not work, no logo would show at all!

    Ninja Lead Moderator
    #540963

    <em>@austenn01 429598 wrote:</em><blockquote>Hello,

    I want to add the Schema MircoData Code for LOGO to the header.php file (unless there is a better way to implement this?

    <div itemscope itemtype="http://schema.org/Organization">
    <img itemprop="logo" src="http://www.example.com/logo.png" />
    </div>


    Can anyone advise how to add the Schema code for the template logo in JoomlArt templates (IE Purity III)???</blockquote>

    Hope my workaround below would help.

    Open templates/purity_iii/tpls/blocks/header.php file,

    Change:

    <div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>

    To:

    <div itemscope itemtype="http://schema.org/Organization" class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img itemprop="logo" class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img itemprop="logo" class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>

    Let me know if it helps.

    austenn01 Friend
    #568624

    <em>@Ninja Lead 434932 wrote:</em><blockquote>Hope my workaround below would help.

    Open templates/purity_iii/tpls/blocks/header.php file,

    Change:

    <div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>

    To:

    <div itemscope itemtype="http://schema.org/Organization" class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img itemprop="logo" class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img itemprop="logo" class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>

    Let me know if it helps.</blockquote>

    Hello,

    Works great, thankyou!

    John

    austenn01 Friend
    #733718

    <em>@Ninja Lead 434932 wrote:</em><blockquote>Hope my workaround below would help.

    Open templates/purity_iii/tpls/blocks/header.php file,

    Change:

    <div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>

    To:

    <div itemscope itemtype="http://schema.org/Organization" class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
    <a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
    <?php if($logotype == 'image'): ?>
    <img itemprop="logo" class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <?php if($logoimgsm) : ?>
    <img itemprop="logo" class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
    <?php endif ?>

    <span><?php echo $sitename ?></span>
    </a>
    </div>

    Let me know if it helps.</blockquote>

    Hello,

    Works great, thankyou!

    John

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  austenn01 8 years, 12 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum