Jump to content

if page is cms


idm1

Recommended Posts

Hi

I want to add a full width banner image to my cms pages. If I add this code to the cms page (page.tpl in the cms folder) or ideally on the header page (then the image will be full width) either nothing happens or I get an undefined error message.

 

{if $cms->link_rewrite == 'about-us'}
<img src="image.jpg">
{/if

{if $cms->id == 4}
 <img src="image.jpg">
{/if}

 

can anyone help?

I'm using the presatshop 1.7

Many thanks

Link to comment
Share on other sites

Just now, tantan199 said:

Which file did you put the code into?

 

I was just about to edit my above response to the following as I put in the header file...

Brilliant, thanks,  This works page.tpl (in the cms folder) but I would like it in the header file as the image is full width and need the image under navigation bar.

Can this be achieved?

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