subpagelist / sitemap

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

subpagelist / sitemap

grahamtk
Hi!
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?

Regards,
√ėyvind



--
View this message in context: http://monster-menus.2910260.n2.nabble.com/subpagelist-sitemap-tp7572845.html
Sent from the Monster Menus mailing list archive at Nabble.com.

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=699311
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: subpagelist / sitemap

Dan Wilga-2
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
that route.

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
   $mm_node_subpglist_view($node, 'full');
   $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
included.

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
like this:

   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>.

You could probably also do the above with:

   mm_content_get_tree($starting_mmtid, array(
     MM_GET_TREE_RETURN_FLAGS => TRUE,
     MM_GET_TREE_WHERE => "flags.flag = 'my_flag_name'",
     MM_GET_TREE_ITERATOR => $my_iterator,
   ));

This has the advantage that the iterator would be provided the depth
automatically.

On 3/5/14, 8:22 AM, grahamtk wrote:

> Hi!
> 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?
>


---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=699314
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: subpagelist / sitemap

grahamtk
In reply to this post by grahamtk
What about creating a field formatter for mm fields that allows for a node
with a mm field to be rendered as a subpagelist?

that would be awesome!




--
View this message in context: http://monster-menus.2910260.n2.nabble.com/subpagelist-sitemap-tp7572846p7572955.html
Sent from the Monster Menus mailing list archive at Nabble.com.

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=705762
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: subpagelist / sitemap

grahamtk
This post has NOT been accepted by the mailing list yet.
In reply to this post by grahamtk
What about creating a field formatter for mm fields that allows for a node with a mm field to be rendered as a subpagelist?

that would be awesome!
Loading...