Jump to content
haha

there on setting ->template choose not show my template

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...