Jump to content

[Solved] Multiple CMS Template


xiawa

Recommended Posts

I would like to have different cms template for different cms page, is it possible to be done?

Let's say:
Subcategory 1: Help (include cms page Payment, Shipping, Return Policy...etc)
Subcategory 2: About (include cms page Company Info, History, Press...etc)

I want to include a particular navigation sidebar on the left hand side of each cms page. For example:



  • -Payment
  • -Shipping
  • -Return Policy
on the cms pages listed under Help


  • -Company Info
  • -History
  • -Press
on the cms pages listed under About

Did a search on internet and the closest result I could get is adding this code before the

{if $cms->id == X}ADD YOUR CODE HERE{/if}

But I couldn't add more than a X

Any advice and help will be much appreciate. Thanks.
Link to comment
Share on other sites

instead of $cms->id == X, you can do {if in_array($cms->id, array(X,Y,Z))}

or $cms->id == X OR $cms->id == Y


3rd solution (even if it's similar), you can do "if $cms->id != X"


Thanks Michael! Works like a charm :)

Btw do you know that if it could be achieve with dynamic code? I try:

>{if isset($cms_pages) & !empty($cms_pages)}
</pre>
<ul>
               {foreach from=$cms_pages item=cmspages}

getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}

               {/foreach}
</ul>
<br



but not works.

Link to comment
Share on other sites

its ok, the problem is solved by ur 1st suggestion anyway. Just try to figure out is there any easier way to achieve the same results.
Anyway I am marking this thread as solved. Thanks Michael ;)

Link to comment
Share on other sites

  • 4 years later...

Hi,

I have the same problem, I would like to display only a few pages cms a block of links in the left column and other columns in other pages cms .. how you solved? files that you have changed?

thanks to who will reply

Edited by locen (see edit history)
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...