Jump to content

show image in header for specific cms page


Recommended Posts

I assume that you're developer, so...


You can do it this way:

{if isset($cms) && $cms->id_cms > 0}
{if $cms->id_cms == '2'}
<img src="{$img_dir}example_image.jpg" />
{elseif $cms->id_cms == '3'}
<img src="{$img_dir}another_image.jpg" />
<img src="{$img_dir}default_image.jpg" />

Of course you can also using image as a background, add special class to body and replace image using CSS:

<body class="{if isset($cms) && $cms->id_cms > 0}cms_page_{$cms->id_cms}{/if}">
Edited by Krystian Podemski (see edit history)
Link to comment
Share on other sites

  • 3 weeks 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
  • Create New...