leiger wrote on 01 Jan 2010 22:11
The code
[[module ListUsers users="."]]
Hello %%title%%
[[/module]]
works fine when typed directly onto the page it's used on.
However, when using it in a live template, I get this result on the page that uses that live template:
Hello [[user ]] (if the page has no title)
or
Hello homepage (if the page's title is 'homepage')
Example… on the homepage of http://cyclods.wikidot.com/
The "sidebar" is actually just part of a live template (_default:_template)
Edit: I've made a workaround (including the page instead of using a live template) so that website no longer shows the problem.
Okay, strange occurrence…
If I press preview while editing the page, it works fine in the preview. But saving the page produces the broken result I mentioned in the first post.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
http://sandbox.wikidot.com/listusers:_template
http://sandbox.wikidot.com/listusers:example
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Shane,
We've pushed the fix for this, could you check it at some point? Thanks!
Portfolio
Okay, I may be mistaken here… but it seems that the ListUsers module is now working on listusers:example but the %%site_title%% variable is not (it was working when I posted about this problem)
Edit: Okay, this seems to be a result of the site title variable being placed inside the ListUsers module. If I take it out of that module I suspect it will work, however the variable would then be forced to display on a different line.
I'd suggest that ListUsers, CountPages, and all other similar modules should support the ListPages variables such as site_title, site_domain, site_name, created_at, etc. The only difference would be that in ListUser's case, certain variables such as title are overwritten to show a username instead of the page's title.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Yes, these modules all need to support the same basic set of site and page state variables. In fact we need to document these separately rather than as part of the ListPages doc.
Portfolio
Yes, documenting them separately then including them into the ListPages documentation and other documentation pages would work. There'd be only one page to edit, and if there was a way to list the pages that include that one, it would be easy to make a list of modules to test when a new variable is added, to make sure they work all round.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)