Jump to content

is this link ok?


Nick20000

Recommended Posts

hi. i have been trying to add a simple link "shop now" below by best sellers title. i have highlighted the code i added in red, can you tell me if this is the correct way of adding this link? it looks ok on my main page and displays fine but just want to be sure. i have tried many other ways to add a link but it never displays correct and i can't seem to get any help on this.

 

{*<span class="price">{$product.price}</span>*}

</a><a href="{$product.link}" class="lnk_more">{l s='Shop now' mod='blockbestsellers'}</a></p>

</li>

{/foreach}

</ul>

<p class="lnk"><a href="{$link->getPageLink('best-sales')|escape:'html'}" title="{l s='See more' mod='blockbestsellers'}" class="button_large">» {l s='See more' mod='blockbestsellers'}</a></p>

{else}

<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>

{/if}

</div>

</div>

<!-- /MODULE Block best sellers -->

 

thank you.

Edited by Nick20000 (see edit history)
Link to comment
Share on other sites

if you are not getting help, then your review your original post rather than bumping that you got no help.

 

you can also post in job offers if you are unable to resolve via forum or on your own.

 

welcome to development (moved to that section as well)

Link to comment
Share on other sites

As the product name (the line above your shop more) and the price (removed by you) already has a hyperlink to the product detail page, you don't have to add the new link here, but just make it part of the old, existing one:

 

So, looking at your old code:

{*<span class="price">{$product.price}</span>*}
</a><a href="{$product.link}" class="lnk_more">{l s='Shop now' mod='blockbestsellers'}</a></p>
</li>
 
as you see, the blue code is the closing tag of the anchor that already exists, so instead of adding an additional <a>...</a> tag, just add the "Shop now" inside the old one.
 
{*<span class="price">{$product.price}</span>*}
<span class="lnk_more">{l s='Shop now' mod='blockbestsellers'}</span></a></p>
</li>
 
With the added span tag, you can add any css code as needed.
 
Hope this helps,
pascal.
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...