Topic: sitemap snippet
Hi guys, got another question for you...
I'm using code from the sitemap wiki page here: _http://www.wolfcms.org/wiki/howto:create_a_sitemap to create a sitemap for my site. I want to have a simple sitemap display on the bottom of all pages, but I'd like to limit it to two levels deep.
If you take a look at the bottom of the site _http://hardwickvt.org/, you can see that the sitemap is breaking the styling because it is getting too deep with 3 levels. This is the code I'm using to create the sitemap currently:
<?php
function snippet_sitemap($parent)
{
$out = '';
$childs = $parent->children(null,array(),true);
if (count($childs) > 0)
{
$out = '<ul>';
foreach ($childs as $child)
$out .= '<li>'.$child->link().snippet_sitemap($child).'</li>';
$out.= '</ul>';
}
return $out;
}
?>I know I probably just need to make a simple for() loop. Could someone help me out?
Thanks!

