sickshot Posted August 26, 2014 Share Posted August 26, 2014 hi, I need to show image in header for specific cms page using page ID anyone can help? Link to comment Share on other sites More sharing options...
Krystian Podemski Posted August 26, 2014 Share Posted August 26, 2014 (edited) 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" /> {else} <img src="{$img_dir}default_image.jpg" /> {/if} {/if} 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 August 26, 2014 by Krystian Podemski (see edit history) Link to comment Share on other sites More sharing options...
sickshot Posted September 16, 2014 Author Share Posted September 16, 2014 (edited) hello Krystian I have tried your solution ,strange but nothing happens at all... checked cache but nothing I had put it in the header right after logo code... thank you Edited September 16, 2014 by sickshot (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now