[eluser]darkhouse[/eluser]
It's an object - I could've easily have done {page1_slug} but I like the colon syntax. I'm building a CMS solution and in this case I needed some menus to display for specific paths, so rather than create separate templates, I made just one template that had some conditions. I have a library that does all my CMS stuff, which gets the pages based on the uri, so if the uri is /foo/bar it gets the foo page for page1, and then the bar page for page2, and it displays the last page in the _pages array. Here's my code for creating the page1

lug stuff
Code:
for($i = 0, $l = 10; $i < $l; $i++){
$key = 'page'.($i+1);
$data[$key.':slug'] = '';
$data[$key.':title'] = '';
if(isset($this->_pages[$i])){
$data[$key.':slug'] = $this->_pages[$i]->slug;
$data[$key.':title'] = $this->_pages[$i]->title;
}
}
I figure no site will ever have more than 10 page tiers, so I limited it to 10. I loop through and set the values to nothing, and then check to see if there is a page at that tier, and I replace the values.
So then in my template, I've done this:
Code:
{if {page1:slug}=='centre'}
<ul class="menu">
<li><a href="centre/about-us">About us</a></li>
<li><a href="centre/advisory-councils">Advisory Councils</a>
{if {page2:slug}=='advisory-councils'}
<ul class="submenu">
<li><a href="centre/advisory-councils/family-terms-of-reference">Family & Terms of Reference</a></li>
<li><a href="centre/advisory-councils/youth-terms-of-reference">Youth & Terms of Reference</a></li>
</ul>
{/if}
</li>
<li><a href="centre/news">News</a>
{if {page2:slug}=='news'}
<ul class="submenu">
<li><a href="centre/news/latest-news">Latest News</a></li>
<li><a href="centre/news/grandviews-newsletter">Grandviews Newsletter</a></li>
<li><a href="centre/news/media-kit">Media Kit</a></li>
</ul>
{/if}
</li>
<li><a href="contact">Contact Us</a></li>
</ul>
{/if}
Eventually I'll be turning this into a module so the menus will be completely dynamic instead of semi-static, but for now this is working great.