First, while it's not what you're after, it's worth mentioning that MM
has a built-in generator for /sitemap.xml. While I suppose you could
generate an HTML sitemap from this using XSLT, I doubt you'd want to go
If you wanted to, you could use a subpage list with a bit of a hack:
$old_q = $_GET['q'];
$_GET['q'] = "mm/" . $mmtid_to_scan;
// get default settings
$node = _mm_node_subpglist_settings();
// make any settings changes you want to the settings in $node here
$output = $node->content['subpglist'];
$_GET['q'] = $old_q;
Using this approach has the disadvantage that you can't easily exclude
parts of the tree. You probably don't want all top-level branches to be
We were actually considering this very thing, though. What we are
probably going to do is add an MM flag to the page settings (exposed to
all users, not just admins) which can then be queried with something
select * from mm_tree t inner join mm_treee_flags f on f.mmtid =
t.mmtid where f.flag = 'my_flag_name' order by t.sort_idx
That will automatically give you the tree in hierarchical order. You
just need to calculate strlen(t.sort_idx)/4 to know the relative depth
of an item. From that, you can generate a <ul>.
This has the advantage that the iterator would be provided the depth
On 3/5/14, 8:22 AM, grahamtk wrote:
> Any ideas for a sitemap for visitors? for instance as a subpage list?
> however, I would not like to add a subpagelist on the front page..
> is it possible to pick a mmtid or page for a subpagelist - so the starting
> point of the subpage list doesn't have to be the page it is added to? any
> other trick?
> Alternative approaches? Maybe a php call I can make to render it with the
> mmtid as a parameter?