Jump to content

there on setting ->template choose not show my template


haha
 Share

Recommended Posts

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

10030072763_61fe9eefba_o.jpg

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?

10030073193_c583b0c7a2_o.jpg

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...