List pages for current logged in user only

Posted by Helmut_pdorf on 24 Aug 2018 13:41, last edited by Helmut_pdorf on 24 Aug 2018 13:45

Tags: listpages listusers logged-in user

rating: +2+x

This is an old wish (http://feedback.wikidot.com/wish:846) to select only pages from the logged in user in ListPages module.
In the comments of this wish the solution is demonstrated [user VenryxVenryx), but I have never seen this.

Thanks to user SimonHDickinsonSimonHDickinson who asked for this possibility on the community forum .

I created a test on our community-playground for demonstration ( it shows only my own pages): http://community-playground.wikidot.com/listpages-for-logged-in-user-only
The trick is working with the module "ListUsers" - which returns the logged in "user-id" , and than linking to an extra page with the ListPages module selecting the "created_by" over the linking URL !

[module ListUsers users="."]]
[*http://community-playground.wikidot.com/listpages-for-logged-in-user-only1/created_by/%%name%% See your own pages]
[[/module]]
<<--  this  is the important trick where you can built in an extra page  "listpages-for-logged-in-user-only1" with a standard  text of your ListPages module  the used include with the variable logged in "Name" ,
and the called ( by link)  page could  use  the ListPages using the found logged in user as a variable in the url:
[[module ListPages  order="created_at desc"  category="*" created_by="@URL" separate="false" prependLine="||~ Title ||~ User ||~ at ||" appendline="||||||||~ ||" ]]
||%%title_linked%% || %%created_by%% || %%created_at%% ||
[[/module]]

Related articles

Comments

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.