Jump to content

Call page ID in stores.tpl (default theme template)


Malemi
 Share

Recommended Posts

Hello everyone,
 
This is my first post, nice to meet you  :)
 
I need to set-up a custom URL in Default Theme stores.tpl template, I would like img to be linked to each individual shop. I have been able to call "store name" in URL, just need to call CMS page ID assigned to each shop page (I have rewriting ON), not talking about store ID  ;)

<a href="http://www.mysite.com/{$cms->id}-{$store.name|escape:'html':'UTF-8'}"></a>

 
Might you please help how to call page ID, {$cms->id} seems not working in stores.tpl template 
 

{foreach $stores as $store}
<tr class="store-small">
<td class="logo">
{if $store.has_picture}
<div class="store-image">
<a href="http://www.mysite.com/{$cms->id}-{$store.name|escape:'html':'UTF-8'}">
<img src="{$img_store_dir}{$store.id_store}.jpg" alt="" />
</a>
[/color]</div>
{/if}

 

Original file from default theme stores.tpl

{foreach $stores as $store}
<tr class="store-small">
<td class="logo">
{if $store.has_picture}
<div class="store-image">
<img src="{$img_store_dir}{$store.id_store}.jpg" alt="" />
</div>
{/if}

 
Thank you
 
Cheers!

Edited by Malemi (see edit history)

Share this post


Link to post
Share on other sites

Vekia, hello  :)

 

Thaks for answering.

 

Just would like custom link, placed in stores.tpl, to work for any current store links:

<a href="http://www.mysite.com/{$cms->id}-{$store.name|escape:'html':'UTF-8'}"></a>

I get this, CMS ID is missing:

http://www.mysite.com/en/content/-storename

Might you please help how to modify StoreController.php in order this to work in stores.tpl ?

 

THKs

 

:rolleyes:

Edited by Malemi (see edit history)

Share this post


Link to post
Share on other sites

  • 2 months later...

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More