Jump to content

Default PW install sidebar?


PhotoWebMax
 Share

Recommended Posts

Quick question:

The default PS install has a sidebar_item in the main head.inc template file:

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

The thing I notice is that the all the pages in the default site will echo the Summary text from the Home page. I was expecting the other pages to print the text from the individual summaries?

Link to comment
Share on other sites

  1. Go to the admin.
  2. Edit the page "about".
  3. write "lalalalalalalalalalalalalalalalalalalalalalalalalalalalala" in the field called "sidebar".
  4. save the page.
  5. open the "about" page in the browser.

;)

  • Like 1
Link to comment
Share on other sites

The clue is here:

if($page->sidebar) echo $page->sidebar;
                        else echo $homepage->sidebar;

It literally means "if this page has a value in the sidebar field, echo that, else echo the sidebar text from the homepage".

  • Like 2
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...