-
AuthorPosts
-
austenn01 Friend
austenn01
- Join date:
- August 2010
- Posts:
- 175
- Downloads:
- 115
- Uploads:
- 14
- Thanked:
- 33 times in 1 posts
May 28, 2014 at 9:06 am #198242Hello,
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 FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
May 29, 2014 at 10:19 am #537063Please 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
1 user says Thank You to Nazario A for this useful post
austenn01 Friendaustenn01
- Join date:
- August 2010
- Posts:
- 175
- Downloads:
- 115
- Uploads:
- 14
- Thanked:
- 33 times in 1 posts
June 30, 2014 at 2:51 am #540564How 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
July 2, 2014 at 10:59 am #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.
1 user says Thank You to Ninja Lead for this useful post
austenn01 Friendaustenn01
- Join date:
- August 2010
- Posts:
- 175
- Downloads:
- 115
- Uploads:
- 14
- Thanked:
- 33 times in 1 posts
April 28, 2015 at 5:05 am #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 Friendaustenn01
- Join date:
- August 2010
- Posts:
- 175
- Downloads:
- 115
- Uploads:
- 14
- Thanked:
- 33 times in 1 posts
April 28, 2015 at 5:05 am #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
-
AuthorPosts
This topic contains 6 replies, has 3 voices, and was last updated by austenn01 9 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum