Loading...
 
Skip to main content

Features / Usability


PluginList & PluginListpages

Trying to figure out how/whether to use PluginListQuestion and PluginListpagesQuestion. My current issue is sorting results by last modification date, but the bigger question is where to find documentation, as the links I just gave don't give enough info on valid settings for the various arguments.

As near as I can tell, PluginList was written to supersede PluginListpages, and allows the user to list other items besides just wiki pages. Both will list wiki pages, but PluginList has an argument called "type" that allows the user to select other types of pages. For example, these two bits of code produce similar bullet lists of wiki pages:

{LIST()}
{filter type="wiki page"}
{LIST}

{LISTPAGES(showNameOnly=y)}
{LISTPAGES}

One of the differences between the two is the sort order for the results. If I want a list of most recently modified wiki pages — newest to oldest — I can use PluginListPages like this:

{LISTPAGES(sort=lastModif_desc,showNameOnly=y)}
{LISTPAGES}

That's for wiki pages. If I want to list other objects, I guess I need to use PluginList. But how do I sort results? Available doc says I can do something like:

{LIST()}
{filter type="wiki page"}
{sort mode="?????"}
{LIST}

but offers no info on valid settings for sort's mode value ("?????"). What are the sort modes?

There's also no info on valid settings for filter's type setting. What other filter types are available? For example, can I use "article", or do I need to resort to the more specific PluginArticles or PluginModule the last_articles module?

The PluginList documentation is currently flagged as needing more work. I appreciate that it's a lot of work to get doc straight. Any help here would be appreciated, and might help others as well until the doc is complete.

While the question of valid values for PluginList arguments remains, it might help to note that I've finally guessed the value that sorts results by modification date in reverse order. Here's an example:

{LIST()}
{filter type="wiki page"}
{sort mode="modification_date_desc"}
{LIST}

Didn't read that anywhere. Just figured it out by trial/error. Is there an actual list of valid values anywhere?

Thanks!


This feature is still sort of new, and the docs could use some improvement. Like you, I've had to experiment the figure it out. Please be sure to update the docs with any new discoveries you make!