haha Posted October 1, 2013 Posted October 1, 2013 hey,I just post image to describe my problem there i have a page "brands", I don't wanna the 'brands's sidebar' shown his children pages. so I went to make another head.inc ,named "brands-head.inc" and 'brands-basic-page.php' which would grab 'brands-head.inc'. there are parts of my 'brands-head.inc' code <div id="content" class="content"> <div class="container"> <div id="sidebar"> <!---I had delete the child page content here ---> <div class='sidebar_item'> <?php // if the current page has a populated 'sidebar' field, then print it, // otherwise print the sidebar from the homepage if($page->sidebar) echo $page->sidebar; else echo $homepage->sidebar; ?> </div> </div><!--/sidebar--> Then why in the page setting tab, I can't find my "brands-basic-page" template?
adrian Posted October 1, 2013 Posted October 1, 2013 Creating a template php file in your file system won't automatically create a template in PW. You still need to go to Setup > Templates and add the new template. Also, I am not sure why you are creating a separate brands-head.inc file. All you need to do is add a conditional statement in your head.inc file. Something like: if($page->template != "brands-basic-page"){ //echo the sidebar } Let us know if that helps you sort things out. 1
haha Posted October 1, 2013 Author Posted October 1, 2013 Creating a template php file in your file system won't automatically create a template in PW. You still need to go to Setup > Templates and add the new template. Also, I am not sure why you are creating a separate brands-head.inc file. All you need to do is add a conditional statement in your head.inc file. Something like: if($page->template != "brands-basic-page"){ //echo the sidebar } Let us know if that helps you sort things out. Cool. I ve made it. I've created another head.inc cause i don't know the command you wrote for me. thanks dude.
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