Jump to content

Recommended Posts

Posted

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?

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

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
Posted

Sorry, but I started this thread after briefly mixing up the summary and sidebar feeds in one of my test projects. Makes sense now...

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
  • Recently Browsing   0 members

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