Listpages Module
Basics
ListPages module allows to display a list of pages, their content and meta data.
Tips
- When ListPages does not work as expected, check whether a double quote is not missing somewhere!
- ListPages does not display variables such as %%created_at%% in "Preview" if the page is not first saved.
- @URL argument must be written in UPPERCASE
See also: Transition:From Pages to Listpages






example of Code:
[[table]]
[[row]]
[[cell]]
[[module ListPages tags="TheTombofLordTsangAdvQuest" order="name" category="*" Limit="50" separate="no"]]
* %%linked_title%%
[[/module]]
[[/cell]]
[[cell]]
[[module ListPages tags="TheTombofLordTsangAdvQuest" order="name" Limit="100" offset="50" category="*" separate="no"]]
* %%linked_title%%
[[/module]]
[[/cell]]
[[/row]]
[[/table]]
I know user HobStarCS reported this issue as well… but really need this to work.. any idea if its fixed and just my code, or .. ?
If your question is about the pagination not working independently between the lists, you need to add the urlAttrPrefix argument. See the More than one module in the page section in the docs.
I made an example here.
One problem I do see is that the offset argument does not work as expected. In order to list pages 51-100, as in your example you have to set the limit to 100. Doing that essentially creates extra blank pages showing up. For example, this code returns no results.
You have to change the limit to "limit=100" in order to get results and then 4 pages are created, but the last 2 are empty.
This seems like a bug. If someone else can verify that I'm not doing something dumb, I'll report it on the feedback site.
Free Wikidot Applications · Your Shared Photo Gallery · Your Personal Blog
Using this code -
[[cell]]
[[module ListPages tags="Advquest11-20" order="name" category="*" PerPage="25" Limit="100" offset="50" separate="no" urlAttrPrefix="two"]]
[[/module]]
[[/cell]]
and taking your advice and changing the limit to 100, still returned nothing but blank pages.
I would do following code:
1. using the urlAttrPrefix="one" & "two" to differentiate the two listpage modules on one page…
2. limit instead of Limit
3. perPage instead of Perpage
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Ahhh hah!.. bingo.. that worked, Thank you very much!
That's similar to the code I posted on the example page I made, except I used a smaller perPage value.
Helmuti, do you agree that if the perPage setting does not equal the limit when using offset that the extra blank pages generated is a bug? I can see cases where you would want to use pagination to keep the list from getting too long. The example page shows what I mean.
Free Wikidot Applications · Your Shared Photo Gallery · Your Personal Blog
Yes, I see what you mean - not sure if this is really a bug.. I have to test something about our parameters… could be we are using the ListPages module in a little wrong way on one page with different pagination-results ( or different "limit")
The second target list ( the "result" ) is in reality only 50 ( limit 100 - offfset 50) but the pagination is done per the limit of 100…
Looks like a bug and perhaps we could do this all for us simpler and write a bug. :) -
or we try another tricky setup for the Listpages (like an extra include of the seciond ListPages module..? )
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Hi All,
Any way to select pages with the same data field? eg.
So it would show other pages that have the same value for that data field.
Thanks in advance.
There is a wish for exact this on the feedback site:
http://feedback.wikidot.com/wish:205 (that ListPages could select pages by data forms values)
Please - vote for it - arte it up ( it is already in status "accepted" and will be implemented in the future…).
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Ok, done. I hope my wish comes true soon. :)
I'd like to use the ListPages module on one page to display data from an Infobox module currently used in a template for other pages. Not sure how to explain the problem more clearly!
The form_label that I've tried using (see below) isn't working. Is there a way to take the data from the Infobox that I'm missing, or is it not possible at all..?
Thanks!
Can you point us to the pages you are using to try and make this work? I poked around your recent activity and cannot find a dataform. Also, category="characterpage:characterbox" is not correct. characterpage is the category and characterbox is the page name.
From what I can tell, you need to create a live template page for the characterbox category (characterbox:_template) and then place your dataform on that page. Once that's set up, you can use the data from the form fields in your ListPages module.
Free Wikidot Applications · Your Shared Photo Gallery · Your Personal Blog
Thanks for the fast reply!
I've followed your suggestion but still can't seem to make it work… it displays:
..which to me says it's looking but not finding!
What I'm trying to create is a listing (using [[module ListPages]] on the 'Characters' page) of every page in the 'characterpage' category, with information from the 'characterbox' on each individual page (now using [[include characterbox:_template).
Here's the information from characterbox:_template (and/or template:characterbox):
On a side-note, templates don't appear in the list at admin:manage unless I name them 'template:category'. If anything weird is gonna happen, I guarantee it's gonna happen to me :D
You've got a bit confused between the old-style templates (category:template), live templates (category:_template) infoboxes and dataforms and how the different bits work together. As Ed mentioned in his post, it seems like you haven't created a dataform at all, and due to a couple of other errors what I have done is a live example of what I think you are trying to do, and I will also talk you through it here. I have not used an infobox but done it with a dataform, a live template and the listpages module.
Dataform:

Character Page:

Add and List Characters:

The pages I have created have no restrictions so you can add data and test things and see the code.
This is what I did:
1. Create a page called character:_template and add the dataform code as follows:
Above the dataform add 4 ====, this separates the dataform from the results of it when you save a new entry.
Above the ==== add the way you would like the result of the dataform to look on your character's page. For the image I have used the image box snippet from http://snippets.wikidot.com:
Note that for most data you use the syntax %%form_data{fieldname}%%, but for images you use %%form_raw{fieldname}%%
2. Go to your site manager and make the character category autonumbered.
3. Create a page to add and list your characters. I called my page characters:page.
4. On that page add a box to add a new character. In this case I have used the new-page snippet from http://snippets.wikidot.com.
The category must be the same as the live template (i.e not as you had done which was to have characters on a characterpage page but a template called characterbox:_template)
5. Add a listpages module to list your characters from the character category. In this particular case I have used a complex table but of course you can list them anyway you want and include whatever data you want. Again, note that it uses syntax like %%form_data{alias}%% for all the fields except image which uses %%form_raw{image}%%
6. In the box on characters:page add the name of the character and press Enter. The dataform will open for you to add the details, upload the image from your computer. When you are done, press Save.
I hope that has given you what you need, but do come back with any questions.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Strathview ~ Wikidot-based wikis, websites & intranets and online database development. For community groups, villages, charities, business and government.
You're my hero! It's so close to exactly what I'm looking for. :D
Two things:
1. I'd like to include further information on the character page, along with the form data/infobox, for members to customise and add miscellany. Is there a way to arrange editing so it doesn't just take you back to the form?
UPDATE: I think I've almost got this working nicely with a wiki field in the dataform - it certainly allows for additional text, however I can't get gallery thumbnails to display correctly. They still load just fine in the lightbox when clicked, though. Curiouser and curiouser!
2. (just being nitpicky but..) Is there a way to change the colors of the snippets:newpage text? I have a black background and the entered text simply isn't showing up. A small detail, I know.
Thanks so much for your help thus far, Rob!
Question 2: the text color is set in the javascript that controls the snippet, so it's not a question of adjusting some CSS on your site. Probably the easiest thing to do is to make the background of the text box white. You do this by adding the style attribute as follows:
On thumbnails, dataforms don't handle images the same way as Files button at the botom of the page. What I do is to use another listpages module to display the thumbnails:
or you can use the imagebox snippet inside the listpages module so that you can have a header or caption:
The result is shown at http://vineyard.wikidot.com/characters:thumbs
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Strathview ~ Wikidot-based wikis, websites & intranets and online database development. For community groups, villages, charities, business and government.
You're a star. Working beautifully now - and so organised!
Thanks!
New question , old subject. I was looking for something exactly like this to help on pages I've been working on. Needless to say this works. Problem is, I don't want to update the previous 300+ characters on the site to categorize them into 'character'.
So, this being said. I'm trying to create a directory using listpages but I would like an 'or' option in the selection of pages - is this an improbability with wikidot or is there a work around.
By example, both the old pages and the new categorized pages have been tagged with "pc". If I simply do a listpages with tag="+pc" it will only pull the old pages. If I add category="character" to the selection, it only pulls the new pages in the category with the "pc" tag. It would be great if I could combine the lists, like a union query, to get both old uncategorized "pc" characters along with the new improved "pc" characters in the "character" category.
Use category="*" (all) !!
the default categroy is always the same as the current (calling module ListPages) page!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Thanks for that. I had tried it, it seemed obvious. But I didn't see where it was going. Then I recalled the original ordering was on "name" and with the numbering, the character was displayed before the alphabetical listing. I changed ordering to title and it all works great.
This is appreciated.
I would like to use ListPages to automated navigation on topbar. I have tried this:
but doesn't work fine!!!
How can I do that???
Regards
This works on my site:
http://helmuti-pdorf.wikidot.com/nav:top
Notice - it starts at the highest level with the prepend line=".."
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
This worked wonderfully for me!!! Thank you very much. It was precisely what I was looking for.
if the order (different then alphabeltically) is not important and if you set up the parents right…you can use the childpages module for this… it works fine for me.
if the order of the menuitems is important, you can still number the titles of your pages
Hello -
My requirements of ListPages are simple - to create an alphabetic list of all pages on the site and include the last-modified date. Here is my source:
My problem is that the %%updated_at%% variable does not produce any output, i.e. on each row I get a hyperlinked page title, a dash, and then nothing. If I use the %%created_at%% variable, I also get no output. The %%created_by%% variable works as expected.
What am I doing wrong?
Hi Craigo,
Have you tried saving the page? All date-related variables don't appear in the page preview, probably because of how versatile they are (dynamically change depending on visitor's timezone and the format you tell it to appear in).
My suggestion is to try saving the page and see if that solves your problem?
Cheers,
Shane
Shane Smith ★ Website: Wikidot Development & Programming.
STE Wikidot Editor: Windows & Mac OS X. ★ Try it for free!.
I'm also on Twitter, follow me there! ;-)
Well that was easy - thanks Shane, that was it. I had only been previewing the page rather than saving it. Case closed.
I want to have links to previous/next blog posts. Seems straightforward:
I added limit="3" to see more clearly what is going on. Problem is, both modules list all posts, not those before/after current. Is module bugged, or am I doing something wrong?
1. Not sure … I think it is the limit=3 (to read - BEFORE the sorting order makes clear - which pages is before and after…
2. the order="created_at desc desc" looks strange with the second desc ? ?
3. ascending order ( desc desc) prints the same output for "before" as the descending for after ? ( or I am confused now)
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Which page is this code on? Please post link and open for editing (at least temporarily). Would like to be able to edit and use the preview button, to work on finding a solution.
In the meantime… I think the problem might be with your 'order' attribute. Changing both to order="created_at" might work. Combined with the 'range' attribute, I'm guessing it will give you the result you're looking for.
Shane Smith ★ Website: Wikidot Development & Programming.
STE Wikidot Editor: Windows & Mac OS X. ★ Try it for free!.
I'm also on Twitter, follow me there! ;-)
It was here http://nevermind.wikidot.com/blog:_template
I changed order to "created_at" in both modules and it fixed the "next" link. However, the "prev" link is wrong (the same as "next" actually). Setting first module's order to "created_at desc" didn't help, is started linking the last post always.
I am making the site public for now, so you can experiment.
I couldn't get it to work either.
The old, deprecated NextPage and PreviousPage modules will work until a solution can be found for this problem.
Shane Smith ★ Website: Wikidot Development & Programming.
STE Wikidot Editor: Windows & Mac OS X. ★ Try it for free!.
I'm also on Twitter, follow me there! ;-)
Even though you didn't fix it, it's your comment that made me realize what was wrong. So, thank you!
Would you make a report at http://bugs.wikidot.com? Thanks.
Portfolio
The fact that "before" and "after" are in the sorting order is real tricky. It only just "clicked" with me: both orders should use range="after", as I need to see the first post after current in the list; and the lists are respectively all previous posts and all following posts.
Here's working code:
Question asked by
HobStarCS:
I need to be able to perform a ListPages by parent of current page. The result will always be only one (the parent of that page) but that's what I need.
This does not work;
Full code can be seen here
It sound simple and it may just be fatigue, but I can not work it out. Is there an easier way to do this?
Thanks in advance
~ Paul
Do not use ListPages for this. You were selecting the siblings of current page (same parent).
Just type
in your _template.
Perfect, thanks!
I want to deprecate the existing doc pages in favour of the new site, multilingual or not, and use CSIs to link back to the new pages. So no new structure, templates, etc. in the existing doc pages.
When you speak of driving traffic you need to explain why this is better than what we have now (which stinks, I know).
For me, it's not sufficient to just have a thread in a different site. No difference. For me, it's about raising, answering, and closing issues on a doc page. The problem with a thread is that it mixes errata with ideas and help requests.
Thus I'd propose something more process-oriented:
I'd definitely put such an issue tracker on this site. But please don't just move a useless thread from point A to point B, it remains useless.
Relevant patterns:
Portfolio
The problem now is that people goes to the doc and see a box for writing as an opportunity for:
As you said you have mixture of both.
Hence, just close the comments possibility and give two links (via a doc:_template):
- Report a bug : goes to issue tracker, creates a _open issue, etc.
- Get help on : goes to the Community.
As simple!
Yes, this would work perfectly.
Portfolio
me likes this idea. lots.
.Goal NHGC
The idea is that the official doc could link to a new helpon: category here, in order to avoid direct helpdesk on the documentation official website, but drive the traffic here.
Action: