-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Vincent wrote:
| This is very cool. But I need something that will walk down | the pages. a html version of what you see in the left nav of | Aegir under the websites tab. Instead of the page name I would | like to get the <[title]> of each page instead (if available). | Anyone know the algorithm for generating that page tree in Aegir? |
My very old code for handling sitemap creation for pages only (from back when 1.2.5 was brand new), always uses page->title (though it is trivial to modify).
- ------------ <ul><li><a href="/login/">Intra / Login</a></li> <ul> <?php
function walk_pages($startfrom, $baseuri="/login/") {
~ $subpages=mgd_list_pages($startfrom);
~ if ($subpages) {
~ while ($subpages->fetch()) {
~ if ($subpages->title<>"") { ?>
~ <li><a href="&(baseuri);&(subpages.name);<? if
(mgd_page_has_children($subpages->id)) { ?>/<? } else { ?>.html<? }
?>">&(subpages.title);</a></li>
~ <?
~ if (mgd_page_has_children($subpages->id)) {
~ ?><ul><?
~ $fulluri=$baseuri;
~ $fulluri.=$subpages->name;
~ $fulluri.="/";
~ walk_pages($subpages->id, $fulluri);
~ ?></ul><?
~ }
~ }
~ }
~ }
}
walk_pages(53); ?></ul></ul> - ----------
/Rambo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-nr2 (Windows 2000) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/mVH3i7iLtQbxbW8RAhCFAJ9uvLU1WNVNiAZD9LsmLB3bCogfMACfUH4o GnAeaIH5bDSq/i7iCd2SgCg= =/l6T -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
