Gabrys wrote on 21 Dec 2009 19:14
I moved the current from value to option usertype (usertype="current") to separate selector (current="true").
Some example may prove it's a good thing:
[[module ListUsers usertype="member"]]
Show text only to logged in user:
[[module ListUsers current="true"]]
You're now logged in. Your nick name is %%title%%.
Show menu to logged in admins of the site:
[[module ListUsers current="true" usertype="admin"]]
+ Admin panel
* [[[Add post]]]
* [[[Add thread]]]
* [[[Manage users]]]
* [[[Manage site]]]
It works by selecting this admin, who is the one that currently views the page. If user is not an admin ListUsers returns nothing. If user is not logged in, the same applies. If user viewing the page is logged in and is admin of the page, it's selected and the contents of the module is rendered with some user variables (none used) being replaced with his name, title, id and other data.
Start a new sub-thread
page revision: 2, last edited: 04 Jan 2010 14:06