[pmwiki-users] Listing pages by date
Hladůvka Jiří
mail at revida.sk
Fri Mar 9 15:58:32 CST 2007
Jan Erik Moström napsal(a):
> First of all, I'm not looking for some blog feature instead I'm
> trying to figure out if a "calender" of documents is possible/a
> good idea.
>
> My idea/problem:
>
> sometimes I wish I could list documents in some groups by date
> (ideally in a calendar, but right now I'm satisfied with a
> list). Since I'm not interested in creation/modification date
> but rather a "document date" I thought I would use a page
> variable and the pagelist command.
>
> So I started to experiment and inserted a page variable
>
> (:documentdate: 2007-03-09 :)
>
> and then I used
>
> (:pagelist $:documentdate=2*:)
>
> I get a simple list but I wonder if it's a good idea of doing it
> like this or if there's a better way of doing it?
>
> And if this is the way of doing it, how can I sort on the page
> variable and how can I get a listing that look like this
>
> 2007-03-09 The page title
>
> The page title = (:title XXXX:)
>
> I think I can use Site.LocalTemplates but I'm unsure how I do it.
>
> I would be grateful for comments/suggestions
>
> jem
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
> __________ Informacia od NOD32 2105 (20070309) __________
>
> Tato sprava bola preverena antivirusovym systemom NOD32.
> http://www.eset.sk
>
>
>
>
This is a good solution.
You can get the pagelist this way:
(:pagelist $:documentdate=2* order={$:documentdate} fmt=#DocumentDateList:)
(:if false:)
[[#DocumentDateList]]
{=$:documentdate} {=$Title}
[[#DocumentDateListend]]
(:if:)
You need not to use Site.LocalTemplates if you put the template on the
same page as the (:pagelist ...:) command
The (:if false:) is used not to display the fmt source
Note the ":" in {=$:documentdate} as it's a page *text* variable while
in {=$Title} it is missing - it is page variable.
Hope this helps
Jiri
More information about the pmwiki-users
mailing list