idm1 Posted August 6, 2018 Share Posted August 6, 2018 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 More sharing options...
endriu107 Posted August 7, 2018 Share Posted August 7, 2018 Try {$urls.pages.cms}. Link to comment Share on other sites More sharing options...
idm1 Posted August 7, 2018 Author Share Posted August 7, 2018 Hi thanks for responding! That didn't work either Any ideas what else I can try? Link to comment Share on other sites More sharing options...
tantan199 Posted August 7, 2018 Share Posted August 7, 2018 Use this in 1.7 {if $cms.id==4}{/if} Link to comment Share on other sites More sharing options...
idm1 Posted August 7, 2018 Author Share Posted August 7, 2018 2 minutes ago, tantan199 said: Use this in 1.7 {if $cms.id==4}{/if} I get a Notice: Undefined index: cms error... Link to comment Share on other sites More sharing options...
tantan199 Posted August 7, 2018 Share Posted August 7, 2018 Which file did you put the code into? Link to comment Share on other sites More sharing options...
idm1 Posted August 7, 2018 Author Share Posted August 7, 2018 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 More sharing options...
tantan199 Posted August 7, 2018 Share Posted August 7, 2018 {if isset($cms) && $cms.id==4}{/if} 1 1 Link to comment Share on other sites More sharing options...
idm1 Posted August 7, 2018 Author Share Posted August 7, 2018 2 minutes ago, tantan199 said: {if isset($cms) && $cms.id==4}{/if} Wow thanks thats perfect. Thanks for your help! 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