I'm working on a template for another user who wants to use the static pages plugin only - no entries, just pages. Part of the design for the template is a breadcrumb trail for the static pages which corresponds with the parent/child relationship.
The breadcrumb trail only emits the headline of the page the user is on because I can't access the headline of the parent page. I know that we can identify the parent page becuase the on-page navigation links to the parent page with 'TOP'. How do I change the static page plugin to show the headline of that page instead of 'TOP'? BTW, I'm calling the breadcrumb trail from index.tpl at present, but I could easily move this the static pages .tpl files if I need to.
Adding to this question, is it possible to do the same thing with pages further down the heirarchy, so instead of just having a prent/child, could we have parent/child/grandchild, and be able to identify the headline of the child and parent if we're on the grandchild page?
Oh, before I forget, the breadcrumb trail code is as follows;
Code: Select all
<a href="{$serendipityBaseURL}">{$CONST.BLOG_HOME}</a>
{if $head_title && !$entry.title | $head_title != $entry.title}
{if $entry.title}»{/if} {$category.category_name}
{elseif $head_title && $entry.title}
{if $category.category_name}
» <a href="{$category.category_link}" title="{$category.category_description}">{$category.category_name}</a>
{/if}
{if $entry.title == $head_title}
» {$entry.title|truncate:40:" ...":true}
{/if}
{elseif $head_subtitle}
» {$head_subtitle}
{/if}
{if $staticpage_pagetitle && !$entry.title}
» {$staticpage_headline}
{/if}
I hope this makes sense, I'll be away for a couple of days so won't see any replies to this thread until Tuesday but I do need to update the static pages plugin quite urgently. If anyone is able to help, please feel free to email any code changes or updates to me webmaster [at] carlgalloway [dot] com
Thanks,
Carl