Jump to content

Redirect CMS Category to first CMS page


Recommended Posts

Hi,

 

Is it possible when you click on a cms category to open the first cms page instead of having first an overview of all the pages

 

For example

 

If I click on the first cms category in my navigation bar I become:

 

http://www.maselecti..._cms_category=3

 

 

The thing I want is the obtain the first cms page, in this case 'Qui est Marie Melodie'

 

http://www.maselecti...s.php?id_cms=23

 

 

This my code of the blockcategories.tpl

 

 

 

<ul id="main-nav">

{foreach from=$cms_titles.categories item=cms_category}

<li><a class="main-link" href="{$cms_category.link}">{$cms_category.name}</a>

<ul class="sub-links">

{foreach from=$cms_titles.cms item=cms_page}

{if $cms_category.id_cms_category eq $cms_page.id_cms_category}

<li><a href="{$cms_page.link}">{$cms_page.meta_title}</a></li>

{/if}

{/foreach}

</ul>

</li>

{/foreach}

{foreach from=$blockCategTree.children item=child name=blockCategTree}

<li><a class="main-link" href="{$child.link}">{$child.name}</a>

{if count($child.children) gt 0}

<ul class="sub-links">

{foreach from=$child.children item=sub_child}

<li><a href="{$sub_child.link}">{$sub_child.name}</a></li>

{/foreach}

</ul>

{/if}

</li>

{/foreach}

<li><a class="main-link" href="{$base_dir}stores.php">{l s='Magasins'}</a></li>

<li><a class="main-link" href="{$base_dir}blog">{l s='Blog-Creation' module='blockcategories'}</a></li>

 

 

 

 

Thanks in advance

 

Jack

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...