Jump to content

alt="{$imageTitlte}" in product.tpl `?!


Recommended Posts

Hi

 

I have no clue but I would assume that this is a misspelling:

alt="{$imageTitlte}"

You find that one in product.tpl in vanilla Prestashop 1.5.6.2 and 1.6.x and perhaps other versions.

 

If is a misspelling then this'd be suboptimal for SEO onpage optimizations.

Link to comment
Share on other sites

Hi,

 

I check my product.tpl (v.1.6.0.5) and found next lines:

{if !empty($image.legend)}
    {assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'}
{else}
    {assign var=imageTitle value=$product->name|escape:'html':'UTF-8'}
{/if}
alt="{$imageTitle}" title="{$imageTitle}"  

Do you use `default-bootstrap` theme or custom solution? If this happens at the `default-bootstrap` so I suggest update to the latest version.

 

Regards

Link to comment
Share on other sites

No, I just checked my de-zipped folders of the original downloads:

prestashop_1.5.6.2

prestashop_1.6.0.2

 

So, I will to download the newest and check again. But as you say yours says:

    {assign var=imageTitle

all should be crystal clear. I will use your code and am more than sure that the given versions I named have this tiny misspelling.

So, if users of the named and perhaps older versions want to optimize onpage seo they should take a minute and search for the misspelling in product.tpl .

  • Like 1
Link to comment
Share on other sites

Ehm,

 

sorry for the too quick posting of mine. I overlooked that there is a variable assigned! Sorry.

 

This variable is titled " imageTitlte "

{if isset($images)}
				{foreach from=$images item=image name=thumbnails}
					{assign var=imageIds value="`$product->id`-`$image.id_image`"}
					{if !empty($image.legend)}
						{assign var=imageTitlte value=$image.legend|escape:'htmlall':'UTF-8'}
					{else}
						{assign var=imageTitlte value=$product->name|escape:'htmlall':'UTF-8'}
					{/if}
					<li id="thumbnail_{$image.id_image}">
						<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}" rel="other-views" class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}" title="{$imageTitlte}">
							<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium_default')|escape:'html'}" alt="{$imageTitlte}" title="{$imageTitlte}" height="{$mediumSize.height}" width="{$mediumSize.width}" />
						</a>
					</li>
				{/foreach}
			{/if}

So, it works and all is fine. So next time I will have too look for this first :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...