Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

H1 Logo Image Rate Topic   - - - - -

 
  • wesse249
  • Junior Member
  • Members
  • Join Date: 12-Dec 07
  • 39 posts

Posted 04 May 2019 - 06:35 PM #1

Hello,

 

I like to test if my seo becomes better when i place my logo between h1 tags. Now i create this code, but with this code two logo are showed. Can somebody tell me what i'm doing wrong? I only want the h1 tags on my homepage / index page.

 

<?php if (strpos("index.php",$_SERVER["PHP_SELF"])===FALSE): ?>

<h1 class="ty-logo-container"><strong>{$logos.theme.image.alt}</strong><a href="{""|fn_url}" title="{$logos.theme.image.alt}"><img src="{$logos.theme.image.image_path}" width="{$logos.theme.image.image_x}" height="{$logos.theme.image.image_y}" alt="{$logos.theme.image.alt}" class="ty-logo-container__image" /></a></h1>

<?php else: ?>

<div class="ty-logo-container"><strong>{$logos.theme.image.alt}</strong><a href="{""|fn_url}" title="{$logos.theme.image.alt}"><img src="{$logos.theme.image.image_path}" width="{$logos.theme.image.image_x}" height="{$logos.theme.image.image_y}" alt="{$logos.theme.image.alt}" class="ty-logo-container__image" /></a></div>

<?php endif; ?>



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 660 posts

Posted 04 May 2019 - 06:43 PM #2

Hello

 

{if $smarty.request.dispatch == "index.index"}

    {* in h1 *}

{else}

    {* normal *}

{/if}

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • wesse249
  • Junior Member
  • Members
  • Join Date: 12-Dec 07
  • 39 posts

Posted 05 May 2019 - 06:37 AM #3

Thank you very much!



 
  • alaa
  • Advanced Member
  • Members
  • Join Date: 18-Mar 18
  • 132 posts

Posted 05 May 2019 - 01:42 PM #4

Hello,

 

I like to test if my seo becomes better when i place my logo between h1 tags. Now i create this code, but with this code two logo are showed. Can somebody tell me what i'm doing wrong? I only want the h1 tags on my homepage / index page.

 

<?php if (strpos("index.php",$_SERVER["PHP_SELF"])===FALSE): ?>

<h1 class="ty-logo-container"><strong>{$logos.theme.image.alt}</strong><a href="{""|fn_url}" title="{$logos.theme.image.alt}"><img src="{$logos.theme.image.image_path}" width="{$logos.theme.image.image_x}" height="{$logos.theme.image.image_y}" alt="{$logos.theme.image.alt}" class="ty-logo-container__image" /></a></h1>

<?php else: ?>

<div class="ty-logo-container"><strong>{$logos.theme.image.alt}</strong><a href="{""|fn_url}" title="{$logos.theme.image.alt}"><img src="{$logos.theme.image.image_path}" width="{$logos.theme.image.image_x}" height="{$logos.theme.image.image_y}" alt="{$logos.theme.image.alt}" class="ty-logo-container__image" /></a></div>

<?php endif; ?>

 

This solution should work as well with better performance. 

 

{if $runtime.controller == 'index' && $runtime.mode == 'index'}

    {* in h1 *}

{else}

    {* normal *}

{/if}



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11265 posts

Posted 05 May 2019 - 04:08 PM #5

Why do you think it will perform better?  Both are memory references.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • alaa
  • Advanced Member
  • Members
  • Join Date: 18-Mar 18
  • 132 posts

Posted 05 May 2019 - 04:23 PM #6

Why do you think it will perform better?  Both are memory references.

 

Yes, you are correct.