4 - ListPages et al

nav_first.pngFirst: design:1
1 - Rate Module
Edited: 1257343661|%e %b %Y by: Steven Heynderickx
Comments: 21
Tags:

nav_prev.pngPrevious: design:3
3 - Notification configuration
Edited: 1257343661|%e %b %Y by: Steven Heynderickx
Comments: 11
Tags:

nav_last.pngLast: design:32
32 - Parenthood Module
Edited: 1257343661|%e %b %Y by: Steven Heynderickx
Comments: 7
Tags:

nav_next.pngNext: design:5
5 - Page Metadata
Edited: 1257343661|%e %b %Y by: Steven Heynderickx
Comments: 9
Tags:

4 - ListPages et al
Created on 1249666897|%e %B %Y, %H:%M
By pieterh

rating: +6+x

Update: most of the design specified here has been implemented, and so I'm freezing this page, and the discussion, and starting a new page for improvements to what we have already made. — Pieterh 2009-09-24

ListPages is one of the key modules but needs polishing and extension. This design sketch is for a set of incremental improvements to ListPages and related modules. Normal indicates functionality already present; bold indicates functionality scheduled for next delivery; italics indicate functionality not yet scheduled.

Standard selection

Applies to ListPages, CountPages:

  • Select by category: category="category-selector"
  • Select by tag: tags="tag-selector"
  • Select by date: created_at="created-at-selector"
  • Select by parent: parent="parent-selector"
  • Select by page type: pagetype="pagetype-selector"
  • Select by range: range="range-selector"
  • Select by author: created_by="created-by-selector"
  • Select by offset: offset="offset-selector"
  • Select by rating: rating="rating-selector"
  • Select by backlink: backlink="backlink-selector"

Category selector:

  • "." means current category (default)
  • "*" means all categories
  • else, a list of space/comma delimited categories
  • categories are by default additive (category OR category OR category)
  • "-category" means exclude pages in this category (AND NOT)

Tag selector:

  • "-" means pages with no tags, visible or invisible
  • "=" means pages with any of the same visible tags as this page
  • "==" means pages with the exact same visible tags as this page
  • else, a list of space/comma delimited tags
  • tags are by default additive (tag OR tag OR tag)
  • "-tag" means pages without the tag (AND NOT)
  • "+tag" means pages with the tag (AND)

Created-at selector:

  • "=" means created on same day as current page
  • "yyyy" means specified year
  • "yyyy.mm" means specified year and month
  • "last n unit" where 'n' is a count (defaults to 1) and unit is "day", "week", or "month"
  • optionally prefixed by ">", "<", "=", "<=", ">=", "<>" (default is "=")
  • selector takes into account UTC+- site settings (new site manager setting)

Created-by selector:

  • "=" means by created by author of current page
  • "-=" means by not created by author of current page
  • else, a single user name

Parent selector:

  • "-" means pages with no parent
  • "=" means siblings of current page (same parent)
  • "-=" means with different parent than current page
  • "." means children of current page (parent is this page)
  • else specifies a single full page name

Page type selector:

  • "normal" means pages without underscore in name (default)
  • "hidden" means pages starting with underscore
  • "*" means all pages, with or without underscores

Range selector:

  • "." means current page
  • "before" means pages up to but not including current (in order after sorting)
  • "after" means pages after current page (in order after sorting)
  • "others" means pages except current page (replaces old skipCurrent)

Offset selector:

  • "n" means do not show the first n pages (default is 0)

Rating selector:

  • "n" means pages with rating equal to n
  • "=" means pages with same rating as current page
  • optionally prefixed by ">", "<", "=", "<=", ">=", "<>" (default is "=")

Backlink selector:

  • "-" means pages with no backlink (i.e. orphaned pages)
  • else specifies a list of space/comma delimited category:page values

Standard sorting

Applies to ListPages:

  • specify order criteria: order="order-criteria"

Order criteria:

  • property name
  • optionally followed by " desc" meaning "descending"
  • optionally followed by " desc desc" meaning "ascending", which makes "desc" safe to add after any sort order
Property Meaning
name Order by page name (numeric if autonumbered)
fullname Order by category and page name
title Order by page title
parent Order by parent name
created_by Order by author screen name
created_at Order by date created
updated_at Order by date updated
commented_at Order by date of last comment
size Order by number of size
rating Order by rating
revisions Order by number of revisions
children Order by number of children
comments Order by number of comments
watchers Order by number of watchers

For example to order by rating in descending order:

order="rating desc"

Passing arguments by URL

An advanced use of ListPages lets you create variations of a single list using specially constructed links (consisting of the page link followed by arguments and values. These are mainly useful to invoke new selectors, and change the ordering or display.

You can pass any arguments in the URL by specifying argument="@URL|default-value" as the argument value and then appending "/name/value" to the URL used to invoke the page. If the URL does not contain a value for the argument, the default is used. Arguments that do not have @URL in their value cannot be set via the URL. The default value is optional: if you use only {{argument="@URL"} and do not provide a value on the URL, then the argument behaves as if it was not set.

The two main ways of using arguments-by-URL are (a) to create links to a page explicitly, on another page and (b) to generate links within the ListPages itself, so it will reshow itself with different configurations. Here is a simple example:

[[module ListPages category="@URL|design"]]
%%name%% in category %%category%%
[[/module]]

Output order

By default pages are output in the sort order. To reverse the order use:

  • reverse="yes" — outputs pages in reversed order

Page properties

These page properties would be available both in ListPages content, and in live template content:

Property Meaning
Page lifecycle
%%created_at%% Date page was created
%%created_by%% User who created page
%%created_by_linked%% Icon and link to user who created page
%%updated_at%% Date page was updated (edited, tagged, parented)
%%updated_by%% User who updated page
%%updated_by_linked%% Icon and link to user who updated page
%%commented_at%% Date of last comment
%%commented_by%% User who made last comment
%%commented_by_linked%% Icon and link to user who made last comment
Page structure
%%name%% Page name without category
%%category%% Page category if any
%%fullname%% Page name with category if any
%%title%% Page title
%%title_linked%% Link to page showing title as text
%%parent_name%% Parent page name without category
%%parent_category%% Parent page category if any
%%parent_fullname%% Parent page name with category if any
%%parent_title%% Parent page title
%%parent_title_linked%% Link to Parent page showing title as text
%%link%% URL pointing to page
%%content%% Page content
%%content{n}%% Numbered content section
%%summary%% Short content, first paragraph
%%tags%% Page visible tags (not starting with underscore)
%%tags_linked%% Page visible tags linked to system:page-tags/tag/{tag}
%%tags_linked|link_prefix%% Page visible tags linked to link_prefix{tag}
%%_tags%% Page hidden tags (starting with underscore)
%%_tags_linked%% Page hidden tags linked to system:page-tags/tag/{tag}
%%_tags_linked|link_prefix%% Page hidden tags linked to link_prefix{tag}
%%field{name}%% Field value from page data form
%%field_display{name}%% Displayed field value if different
Page reporting
%%children%% Number of child pages
%%comments%% Number of comments on page
%%views%% Number of times page has been viewed
%%watchers%% Number of watchers on page
%%size%% Number of characters in page
%%rating%% Page rating value
%%revisions%% Number of revisions to page
%%index%% Page index in ListPages output + offset (1 to %%total%%)
%%total%% Total number of pages in ListPages output (highest %%index%%)
%%history%% Summary of last edits to page
Current context
%%site_title%% Title of current site
%%site_name%% Wikidot Unix name for site
%%site_domain%% Active domain name of current site
%%user%% Current logged user name if any, else "anonymous"
%%user_linked%% Icon and link to current logged user, if any
%%user_status%% Returns anonymous, member, moderator, administrator or master-administrator
%%now%% Current date taking into account site UTC +- settings

Property selection:

  • %%property-name{n}%% - when the property occurs more than once, selects instance 'n', where '1' is the first instance. Applies to content.

Output formatting:

  • %%property-name(n)%% - truncates the property to a maximum of 'n' characters. Applies to all string properties.
  • %%property-name?value%% - provide default value if property name is empty. Applies to all string properties.

Date formatting:

  • All _at fields are dates and allow a custom format via the |format specifier.

Tag linking:

  • If no link_prefix is specified, tags link to system:page-tags/tag/name-of-tag
  • If link_prefix is specified, tags link to link_prefixname-of-tag (colors irrelevant)
  • Examples
if syntax is: "shiny" tag will link to:
%%tags_linked%% /system-page-tags/tag/shiny
%%tags_linked|system-page-tags/tag/%% /system-page-tags/tag/shiny
%%tags_linked|interesting-list/category/%% /interesting-list/category/shiny
%%tags_linked|player:%% /player:shiny
%%tags_linked|very_%% /very_shiny
%%tags_linked|http://myothersite.wikidot.com/see-also/tag/%% http://myothersite.wikidot.com/see-also/tag/shiny

Comments: 166

Add a new comment
et al
BrunhildaBrunhilda 1257343318|%e %b %Y, %H:%M %Z|agohover

Pieter, it should be et al, not et all…


The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. Bertrand Russell

unfold et al by BrunhildaBrunhilda, 1257343318|%e %b %Y, %H:%M %Z|agohover
Re: et al
pieterhpieterh 1257343695|%e %b %Y, %H:%M %Z|agohover

Pieter, it should be et al, not et all…

Strange, I know this. Thanks for pointing it out.

unfold Re: et al by pieterhpieterh, 1257343695|%e %b %Y, %H:%M %Z|agohover
Why?
James KanjoJames Kanjo 1253719132|%e %b %Y, %H:%M %Z|agohover

Why is it that when range="others" or skipCurrent="true" is used simultaneously with separate="false" that the current page is still part of the list?

Why does it matter if you separate the pages or not for this to work?


λ James Kanjo | blog | photos | contact

unfold Why? by James KanjoJames Kanjo, 1253719132|%e %b %Y, %H:%M %Z|agohover
Re: Why?
pieterhpieterh 1253738719|%e %b %Y, %H:%M %Z|agohover

It's a bug IMO. Reported, will check.

unfold Re: Why? by pieterhpieterh, 1253738719|%e %b %Y, %H:%M %Z|agohover
Re: Why?
GabrysGabrys 1254776244|%e %b %Y, %H:%M %Z|agohover

I can't reproduce this, though, do you have a live example of this wrong behavior?


Piotr Gabryjeluk
visit my blog

unfold Re: Why? by GabrysGabrys, 1254776244|%e %b %Y, %H:%M %Z|agohover
Re: Why?
James KanjoJames Kanjo 1254798287|%e %b %Y, %H:%M %Z|agohover

Yes, I do:

This page has a table that says “Also on this day:”. The first option in the list is its own page.


λ James Kanjo | blog | photos | contact

unfold Re: Why? by James KanjoJames Kanjo, 1254798287|%e %b %Y, %H:%M %Z|agohover
Re: Why?
GabrysGabrys 1254817864|%e %b %Y, %H:%M %Z|agohover

I recently noticed, the code for range="others" is slightly broken and instead it requires range="other". The fix is already scheduled. In the meantime, try to reproduce this problem with skipCurrent="true".


Piotr Gabryjeluk
visit my blog

unfold Re: Why? by GabrysGabrys, 1254817864|%e %b %Y, %H:%M %Z|agohover
Re: Why?
James KanjoJames Kanjo 1254821436|%e %b %Y, %H:%M %Z|agohover

skipCurrent="true" works fine now… That's a funny bug!

The fix is scheduled, but when it's released, will we need to edit/save our pages for it to take effect?


λ James Kanjo | blog | photos | contact

unfold Re: Why? by James KanjoJames Kanjo, 1254821436|%e %b %Y, %H:%M %Z|agohover
Re: Why?
GabrysGabrys 1254821848|%e %b %Y, %H:%M %Z|agohover

ListPages is generated independently from pages, so you don't have to edit&save them. But as the results are cached for some time, you may to wait some time after the fix is there.


Piotr Gabryjeluk
visit my blog

unfold Re: Why? by GabrysGabrys, 1254821848|%e %b %Y, %H:%M %Z|agohover
%%tags%%
gerdamigerdami 1253457600|%e %b %Y, %H:%M %Z|agohover

In a _template I wanted to pass %%tags%% to module FlickrGallery just like this:

[[module FlickrGallery tags="%%tags%%" tagMode="any"]]

It failed because %%tags%% are separated by spaces while the module expected commas.
unfold %%tags%% by gerdamigerdami, 1253457600|%e %b %Y, %H:%M %Z|agohover
Re: %%tags%%
GabrysGabrys 1253461078|%e %b %Y, %H:%M %Z|agohover

Do you have idea if at Flickr, tags contain spaces?


Piotr Gabryjeluk
visit my blog

unfold Re: %%tags%% by GabrysGabrys, 1253461078|%e %b %Y, %H:%M %Z|agohover
Re: %%tags%%
gerdamigerdami 1253462519|%e %b %Y, %H:%M %Z|agohover

I just tried at flickr: space is actually a delimiter.
Gabrys has all right: by default space is a delimiter when entering Flickr tags but you enter "tags like this" between double quotes.

last edited on 1253528487|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold Re: %%tags%% by gerdamigerdami, 1253462519|%e %b %Y, %H:%M %Z|agohover
Re: %%tags%%
GabrysGabrys 1253463170|%e %b %Y, %H:%M %Z|agohover

Yes, they can, so we must keep the syntax for FlickrModule.


Piotr Gabryjeluk
visit my blog

unfold Re: %%tags%% by GabrysGabrys, 1253463170|%e %b %Y, %H:%M %Z|agohover
Re: %%tags%%
Ed JohnsonEd Johnson 1253485302|%e %b %Y, %H:%M %Z|agohover

we must keep the syntax for FlickrModule

Are you sure?

I think you can remove the comma delimiter as Gerdami wants. I looked closer at Flicker and while they do allow tags to be created with spaces, you must surround them with double quotes. Flicker then strips out the space(s) when forming the URL.

The Flickr tag :"still life" becomes "stilllife":
http://www.flickr.com/photos/tags/stilllife/

Here is a test page showing that "still life" and "stilllife" tags produce the same results.
http://myfamilyphotos.wikidot.com/sandbox:flickr-tags

As long as we know to tag our pages in a "Flickr friendly" way, we can use %%tags%% with the Flickr module if you change the code to support space-separated tags rather than comma-separated tags.

-Ed

last edited on 1253485365|%e %b %Y, %H:%M %Z|agohover by Ed Johnson + show more
unfold Re: %%tags%% by Ed JohnsonEd Johnson, 1253485302|%e %b %Y, %H:%M %Z|agohover
Re: %%tags%% within module FlickrGallery
gerdamigerdami 1253528659|%e %b %Y, %H:%M %Z|agohover

Module FlickrGallery can stay like it is.
However, ListPages could render %%tags%% with commas in between tags, or let us choose the delimiter.

unfold Re: %%tags%% within module FlickrGallery by gerdamigerdami, 1253528659|%e %b %Y, %H:%M %Z|agohover
Re: %%tags%% within module FlickrGallery
Ed JohnsonEd Johnson 1253535377|%e %b %Y, %H:%M %Z|agohover

or let us choose the delimiter.

Good point. It would be nice if there was consistency between all modules on how tags are handled when passed as a parameter. I generally prefer comma-delimited simply because it's what I'm used to from the majority of other software packages I use. Plus, I think it's easier to read the code.

-Ed

unfold Re: %%tags%% within module FlickrGallery by Ed JohnsonEd Johnson, 1253535377|%e %b %Y, %H:%M %Z|agohover
@URL back
GabrysGabrys 1253256082|%e %b %Y, %H:%M %Z|agohover

As many of you complain about the new passing arguments by URL, which overrides what you have defined in your modules, we decided to put the @URL thing back, but allowing a default value in case you don't have the corresponding /name/value in the URL. The new syntax would be (compatible with old), for example:

category="@URL|design"

meaning: take category from URL, if not there, use "design".

category="@URL"

means take category from URL, if not there use the default value.

This should work for every ListPages and CountPages parameter.

I will be updating this page shortly. Page updated. See the "Passing argument by URL" section.


Piotr Gabryjeluk
visit my blog

last edited on 1253256842|%e %b %Y, %H:%M %Z|agohover by Gabrys + show more
unfold @URL back by GabrysGabrys, 1253256082|%e %b %Y, %H:%M %Z|agohover
Re: @URL back
leigerleiger 1253259009|%e %b %Y, %H:%M %Z|agohover

If I understand how this works correctly, that will be very useful! :)

Currently I have this on my page to set up the default values:

[[div style="display : none;"]]
[[module Redirect destination="http://cyclods.wikidot.com/download:skin/noredirect/true/order/ratingDesc/tags/-_closed/limit/5"]]
[[/div]]

This would mean that I can remove the redirect module =)

unfold Re: @URL back by leigerleiger, 1253259009|%e %b %Y, %H:%M %Z|agohover
Re: @URL back
pieterhpieterh 1253261328|%e %b %Y, %H:%M %Z|agohover

@gabrys, thanks for this. It's a good improvement.

unfold Re: @URL back by pieterhpieterh, 1253261328|%e %b %Y, %H:%M %Z|agohover
Date formatting
HobStarCSHobStarCS 1253230402|%e %b %Y, %H:%M %Z|agohover

I would like to display a list of the most recent pages created in a particular category in order of newest first WITh the date it was created. BUT I would like the date to be shorter than "25 Aug 2009, 00:32 GMT+1000" perhaps just "25 Aug 2009", what is the best way to code that?

ALSO, I always get confused, acs = oldest to newest desc = newest to oldest, in my example?

[[module ListPages category="pc-software" order="created_at acs" separate="yes"" limit="10" perPage="10"]]
%%linked_title%% ~ %%created_at%%
[[/module]]

Thanks in advance
unfold Date formatting by HobStarCSHobStarCS, 1253230402|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
RobElliottRobElliott 1253231804|%e %b %Y, %H:%M %Z|agohover

The syntax is:

[[module ListPages category="pc-software" separate="yes" limit="10" perPage="10"]]
%%linked_title%% ~ %%created_at|%d %b %Y%%
[[/module]]

This gives you the date as 17 Sep 2009. A list of the date formats is at http://community.wikidot.com/howto:frontforum-date-variable

I couldn't get the created_at sort order used in your example to work but it appears to default to desc (i.e. newest to oldest). By the way it is asc not acs for ascending.


ad5.png
last edited on 1253238888|%e %b %Y, %H:%M %Z|agohover by leiger + show more
unfold Re: Date formatting by RobElliottRobElliott, 1253231804|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
James KanjoJames Kanjo 1253247990|%e %b %Y, %H:%M %Z|agohover

order="created_at asc"

Order by ascending is the default — there is no “asc” attribute. If you really must have some sort of way to determine it's not descending, then just:

order="created_at desc desc"

which essentially turns into ascending.


λ James Kanjo | blog | photos | contact

unfold Re: Date formatting by James KanjoJames Kanjo, 1253247990|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
HobStarCSHobStarCS 1253252386|%e %b %Y, %H:%M %Z|agohover

Thanks guys, all sorted now. :)

unfold Re: Date formatting by HobStarCSHobStarCS, 1253252386|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
RobElliottRobElliott 1253266208|%e %b %Y, %H:%M %Z|agohover

Order by ascending is the default

Are you sure? Last night I left out the sort order from the attributes and it came back in descending order. In fact it's still there at the bottom of my page here and it's definitely in descending order.


ad5.png
unfold Re: Date formatting by RobElliottRobElliott, 1253266208|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
James KanjoJames Kanjo 1253270018|%e %b %Y, %H:%M %Z|agohover

I think you misunderstood me. If you specify an order, the default is “ascending” unless you add “ desc” to it.

[[module ListPages order="created_at"]]
[[module ListPages order="created_by"]]
[[module ListPages order="name"]]
[[module ListPages order="rating"]]
[[module ListPages order="comments"]]

All of those above examples are in ascending order (oldest to newest, lowest to highest).

However, if you fail to specify an order:

[[module ListPages]]

Then the order will be automatically set to order="created_at desc"

λ James Kanjo | blog | photos | contact

unfold Re: Date formatting by James KanjoJames Kanjo, 1253270018|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
RobElliottRobElliott 1253279660|%e %b %Y, %H:%M %Z|agohover

Thanks, now I understand.


ad5.png
unfold Re: Date formatting by RobElliottRobElliott, 1253279660|%e %b %Y, %H:%M %Z|agohover
Re: Date formatting
gerdamigerdami 1253294156|%e %b %Y, %H:%M %Z|agohover

Me too.
However, I don't think it's clever to have 2 default orders.

unfold Re: Date formatting by gerdamigerdami, 1253294156|%e %b %Y, %H:%M %Z|agohover
I dont understand...
BrunhildaBrunhilda 1253214620|%e %b %Y, %H:%M %Z|agohover

Which module should be used for Page reporting part?

I assume this is the statistics for a certain page, but it does not work (or i don't know how to use it).

For example, I want to use this one:

%%views%% Number of times page has been viewed

And I put it like this:

[[module ListPages]]
Viewed: %%views%% times
[[/module]]

But I dont get anything…

Here: http://istorijska-biblioteka.wikidot.com/sandbox:sandbox


The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. Bertrand Russell

unfold I dont understand... by BrunhildaBrunhilda, 1253214620|%e %b %Y, %H:%M %Z|agohover
Re: I dont understand...
leigerleiger 1253239167|%e %b %Y, %H:%M %Z|agohover

It would work like this I'd expect:

[[module ListPages attributes]]
%%title_linked%% has been viewed %%views%% times
[[/module]]

Or if you were to put it into a template:

%%content%%

Viewed: %%views%% times

====
Add your content here, then press Ctrl+S or Save.

unfold Re: I dont understand... by leigerleiger, 1253239167|%e %b %Y, %H:%M %Z|agohover
Re: I dont understand...
BrunhildaBrunhilda 1253267391|%e %b %Y, %H:%M %Z|agohover

This does not work…

http://istorijska-biblioteka.wikidot.com/sandbox:sandbox

http://istorijska-biblioteka.wikidot.com/sandbox:_template

PS: As a matter of fact, I do not understand what's this for. Is this to list all pages with the number of views for each one, or to have at each page the number fo views for that particular page?


The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. Bertrand Russell

last edited on 1253267786|%e %b %Y, %H:%M %Z|agohover by Brunhilda + show more
unfold Re: I dont understand... by BrunhildaBrunhilda, 1253267391|%e %b %Y, %H:%M %Z|agohover
Re: I dont understand...
pieterhpieterh 1253268293|%e %b %Y, %H:%M %Z|agohover

@Brunhilda: views is not implemented yet. All italic text in the design page is unimplemented. I've created a new ListPages documentation that should be more clear.

unfold Re: I dont understand... by pieterhpieterh, 1253268293|%e %b %Y, %H:%M %Z|agohover
Re: I dont understand...
BrunhildaBrunhilda 1253270625|%e %b %Y, %H:%M %Z|agohover

Ups! So that explains everything! :D Thanks, Pieter!


The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. Bertrand Russell

unfold Re: I dont understand... by BrunhildaBrunhilda, 1253270625|%e %b %Y, %H:%M %Z|agohover
Instead of “linked”
James KanjoJames Kanjo 1253145910|%e %b %Y, %H:%M %Z|agohover

Instead of %% something_linked%%, why not just %%something_link%% ?
That way it's consistent with %%link%%

Just as %%parent_title%% is consistent with %%title%%


λ James Kanjo | blog | photos | contact

unfold Instead of “linked” by James KanjoJames Kanjo, 1253145910|%e %b %Y, %H:%M %Z|agohover
Re: Instead of “linked”
leigerleiger 1253152691|%e %b %Y, %H:%M %Z|agohover

Good idea… though if you'd have mentioned this before the changes were made to the ListPages module….. xD

unfold Re: Instead of “linked” by leigerleiger, 1253152691|%e %b %Y, %H:%M %Z|agohover
Re: Instead of “linked”
GabrysGabrys 1253176629|%e %b %Y, %H:%M %Z|agohover

Actually %%link%% is not linked, so there's no inconsistency.


Piotr Gabryjeluk
visit my blog

unfold Re: Instead of “linked” by GabrysGabrys, 1253176629|%e %b %Y, %H:%M %Z|agohover
Re: Instead of “linked”
leigerleiger 1253199208|%e %b %Y, %H:%M %Z|agohover

So we need a %%link_linked% then? =) This could get confusing…

unfold Re: Instead of “linked” by leigerleiger, 1253199208|%e %b %Y, %H:%M %Z|agohover
Re: Instead of “linked”
GabrysGabrys 1253200351|%e %b %Y, %H:%M %Z|agohover

Well, if you really need something like [http://your-site/some-page http://your-site/some-page], I would call this %%link_linked%%. But who needs this?


Piotr Gabryjeluk
visit my blog

last edited on 1253200502|%e %b %Y, %H:%M %Z|agohover by Gabrys + show more
unfold Re: Instead of “linked” by GabrysGabrys, 1253200351|%e %b %Y, %H:%M %Z|agohover
Re: Instead of “linked”
leigerleiger 1253238670|%e %b %Y, %H:%M %Z|agohover

Exactly right :)
No, it's not needed as it can be done exactly as you've described. I was half joking / sarcastic. Sorry :)

unfold Re: Instead of “linked” by leigerleiger, 1253238670|%e %b %Y, %H:%M %Z|agohover
leigerleiger 1252920739|%e %b %Y, %H:%M %Z|agohover

Yes, yes! A thousand times, yes!
(weneed:100) a %%index%% 1, 2, 3, ... to be used by ListPages when listing results
^^^ Everyone vote that one up!

For consistency with major programming languages, starting at zero (0) might be a better idea, although that might lead to some confusion for newer users. Then again, will new users be using this feature?

My interpretation of this is something along these lines:

for (int i=0; i<10; i++) {
    if (i is odd) { do something; }
    if (i is even) { do something; }
}

Something like iterator support would lead to very powerful uses of ListPages. The above example could be used to sort data evenly into two columns (odd results in left, even results in right).

Or, much more simply:

// If i begins at zero, then numbers are simply i+1
1. Result one
2. Result two
3. Result three

Maybe I'm a bit ambitious, but…
Great idea gerdami!

unfold by leigerleiger, 1252920739|%e %b %Y, %H:%M %Z|agohover
Re:
graphmasturgraphmastur 1252928455|%e %b %Y, %H:%M %Z|agohover

I am personally against starting with 0. As programmers, you and I think that makes sense. As normal users… It wouldn't be pretty. Just keep it starting with one.


"But sanctify the Lord God in your hearts, and always be ready to give a defense to everyone who asks you a reason for the hope that is in you, with meekness and fear;" ~ 1 Peter 3:16

unfold Re: by graphmasturgraphmastur, 1252928455|%e %b %Y, %H:%M %Z|agohover
Re:
James KanjoJames Kanjo 1252930009|%e %b %Y, %H:%M %Z|agohover

I agree. Though zero is the first number, it doesn't make sense to use it anywhere else but programming.


λ James Kanjo | blog | photos | contact

unfold Re: by James KanjoJames Kanjo, 1252930009|%e %b %Y, %H:%M %Z|agohover
Re: nothing
Phil ChettPhil Chett 1253200711|%e %b %Y, %H:%M %Z|agohover

0 is nothing. That is , a lack of anything, doesn't exist.
1 is something. it exists. it lives!

unfold Re: nothing by Phil ChettPhil Chett, 1253200711|%e %b %Y, %H:%M %Z|agohover
Re: nothing
RobElliottRobElliott 1253222202|%e %b %Y, %H:%M %Z|agohover

Though zero is the first number, it doesn't make sense to use it anywhere else but programming.

If only my bank manager would agree. Actually he thinks zero would be an improvement!

Rob


ad5.png
unfold Re: nothing by RobElliottRobElliott, 1253222202|%e %b %Y, %H:%M %Z|agohover
Re:
pieterhpieterh 1253004000|%e %b %Y, %H:%M %Z|agohover

I added %%index%% to this page a few days before Gerdami made the weneed. Great minds think alike, or as my mum used to say, "fools seldom differ".

There is no way in Wikidot to do complex logic in page processing (if else etc.) because this makes a mess of caching and without caching, everything stops. This is one of the realities we work with.

So %%index%% would not be usable for splitting into odd/even, calculations, etc. Won't happen. But at least, for numbering, it will be useful.

unfold Re: by pieterhpieterh, 1253004000|%e %b %Y, %H:%M %Z|agohover
Optional order criteria: Reverse
James KanjoJames Kanjo 1252915997|%e %b %Y, %H:%M %Z|agohover

I would like to see a “reverse” option in the order of ListPages.

The newest 5 pages, from oldest to newest are:
[[module ListPages order="created_at desc rev" limit=5]]
* %%title_linked%%
[[/module]]

Basically, the ListPages behaves as normal by listing the 5 pages. But if the reverse operator is set, then the list is simply turned upside down.

This would be useful, for example, with the Chatroom application.


λ James Kanjo | blog | photos | contact

unfold Optional order criteria: Reverse by James KanjoJames Kanjo, 1252915997|%e %b %Y, %H:%M %Z|agohover
Re: Optional order criteria: Reverse
leigerleiger 1252928010|%e %b %Y, %H:%M %Z|agohover

I'm confused… doesn't created_at (on its own) do that?

unfold Re: Optional order criteria: Reverse by leigerleiger, 1252928010|%e %b %Y, %H:%M %Z|agohover
Re: Optional order criteria: Reverse
James KanjoJames Kanjo 1252929826|%e %b %Y, %H:%M %Z|agohover

No, but I can see the confusion.

Look at these pages. Let's assume that each of these pages were created on the month that they are named:

  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September
This code:
[[module ListPages order="created_at desc" limit="4"]]
* %%title%%
[[/module]]

Will render pages from newest to oldest:

  • September
  • August
  • July
  • June

I want those pages, but in the reversed order:

  • June
  • July
  • August
  • September

λ James Kanjo | blog | photos | contact

unfold Re: Optional order criteria: Reverse by James KanjoJames Kanjo, 1252929826|%e %b %Y, %H:%M %Z|agohover
Re: Optional order criteria: Reverse
leigerleiger 1252978337|%e %b %Y, %H:%M %Z|agohover

Ah, that makes sense. I think pieter mentioned something like created_at desc desc somewhere else. On the forums, maybe.

unfold Re: Optional order criteria: Reverse by leigerleiger, 1252978337|%e %b %Y, %H:%M %Z|agohover
Re: Optional order criteria: Reverse
James KanjoJames Kanjo 1252993885|%e %b %Y, %H:%M %Z|agohover

http://forum.wikidot.com/thread:scrollbar-and-order-of-threads-in-this-forum/comments/show#post-583460


λ James Kanjo | blog | photos | contact

unfold Re: Optional order criteria: Reverse by James KanjoJames Kanjo, 1252993885|%e %b %Y, %H:%M %Z|agohover
Tags selector includes hidden tags - currently no way to prevent this
leigerleiger 1252658646|%e %b %Y, %H:%M %Z|agohover

For the tags selector:

  • "=" means pages with any of the tags as this page

For the Iron Giant site, the template uses this code…

++* Similar projects
[[module ListPages category="project" tags="=" separate="false" limit="5" order="random"]]
• %%linked_title%%
[[/module]]

… which shows a list of pages with similar tags (therefore, similar content). However, hidden tags (_concept, _stable, etc) are also included in this and as a result some completely unrelated templates are showing up as being "similar".

A way to do this without including hidden tags would be great.

Re: Tags selector includes hidden tags - currently no way to prevent this
pieterhpieterh 1252659420|%e %b %Y, %H:%M %Z|agohover

IMO "=" should ignore hidden tags. I'll make that change to the specs.

Commented_at w/o comments
AsheAshe 1252630040|%e %b %Y, %H:%M %Z|agohover

I've noticed that if you use %%commented_at%% and the listed page doesn't have any comments, it prints out the raw substitution code. See http://sandbox.wikidot.com/ashe:listpages.

Would it be possible to fill with %%created_at%% in such cases?

Similarly, %%created_by%% as the fallback for %%commented_by%% when there are no comments?

unfold Commented_at w/o comments by AsheAshe, 1252630040|%e %b %Y, %H:%M %Z|agohover
Re: Commented_at w/o comments
leigerleiger 1252652354|%e %b %Y, %H:%M %Z|agohover

Sounds good.

But — is there any situation in which someone would want it to print "no comments for this page"1 instead ?

unfold Re: Commented_at w/o comments by leigerleiger, 1252652354|%e %b %Y, %H:%M %Z|agohover
Re: Commented_at w/o comments
pieterhpieterh 1252654411|%e %b %Y, %H:%M %Z|agohover

@leiger: note that we changed this, and an empty tag string is now just empty.

unfold Re: Commented_at w/o comments by pieterhpieterh, 1252654411|%e %b %Y, %H:%M %Z|agohover
Re: Commented_at w/o comments
leigerleiger 1252658709|%e %b %Y, %H:%M %Z|agohover

Didn't realise that! Thanks

unfold Re: Commented_at w/o comments by leigerleiger, 1252658709|%e %b %Y, %H:%M %Z|agohover
Re: Commented_at w/o comments
pieterhpieterh 1252654380|%e %b %Y, %H:%M %Z|agohover

Nice idea. Noted. Vetoed by Michal, correctly. It would be incorrect to show created_at as default for commented_at. Rather, we need to be able to set default values, so %%commented_at?%%created_at%%%%.

For a page with no comments, one can simply print 'Comments: %%comments%%'.

last edited on 1253021576|%e %b %Y, %H:%M %Z|agohover by pieterh + show more
unfold Re: Commented_at w/o comments by pieterhpieterh, 1252654380|%e %b %Y, %H:%M %Z|agohover
Request - Rating
leigerleiger 1252591976|%e %b %Y, %H:%M %Z|agohover

rating: attribute

Can we have a rating attribute? Accepted parameters would be:

  • less than current page
  • less than <number>
  • greater than current page
  • greater than <number>

Why would this be useful? If a commenting system is developed using only pages and not the forum, then each comment can have a rating. If a rating for a comment is less than zero, then it should be treated differently. Perhaps even the same way as YouTube treats negative-rated comments.

Reason I ask instead of just adding it : Will this cause too much server stress?

rating: similar to iftags

An ifrating option would be useful too, similar to iftags :)

[[ifrating <0]]
    [[collapsible]]
    %%content%%
    [[/collapsible]]
[[/ifrating]]

[[ifrating >-1]]
    %%content%%
[[/ifrating]]
unfold Request - Rating by leigerleiger, 1252591976|%e %b %Y, %H:%M %Z|agohover
Re: Request - Rating
pieterhpieterh 1252593691|%e %b %Y, %H:%M %Z|agohover

You mean a rating=">something" selector?

Rating comments would be useful. I'd probably want a ListComments module that lets us play with things like depths… doing things like [[ifrating]] would however mean cache invalidation each time someone rates a comment (this already happens when we rate pages but it's relatively rare).

We need to discuss how to show comments in a wiki-only world separately.

unfold Re: Request - Rating by pieterhpieterh, 1252593691|%e %b %Y, %H:%M %Z|agohover
Re: Request - Rating
leigerleiger 1252652090|%e %b %Y, %H:%M %Z|agohover

You mean a rating=">something" selector?

Yes, and rating="<something" as well.

We need to discuss how to show comments in a wiki-only world separately.

As you might remember, I cloned the forum template a while back with this idea in mind. Due to lack of time I haven't even started looking at it though. Might be a good idea for the community to work on.

last edited on 1252652164|%e %b %Y, %H:%M %Z|agohover by leiger + show more
unfold Re: Request - Rating by leigerleiger, 1252652090|%e %b %Y, %H:%M %Z|agohover
Re: Request - Rating
pieterhpieterh 1252655957|%e %b %Y, %H:%M %Z|agohover

As you might remember, I cloned the forum template a while back with this idea in mind.

Yes. Your idea was to create each comment as a page, attached to the parent. It needs a stand-alone proof of concept. Advantages:

  • A single editor interface
  • Tag and rate comment pages
  • Comment on comments, ad-nauseam
  • Everything done via ListPages
  • Attach files and images to comments
  • Every comment has a unique URL

Disadvantages:

  • No in-line commenting, such as I'm doing now
  • A lot more work in terms of site construction

I'm making a site http://pagetree.wikidot.com to act as sandbox for this. Goal is to make a workable forum with no Comments module :-)

last edited on 1252656215|%e %b %Y, %H:%M %Z|agohover by pieterh + show more
unfold Re: Request - Rating by pieterhpieterh, 1252655957|%e %b %Y, %H:%M %Z|agohover
name desc = title desc
leigerleiger 1252551939|%e %b %Y, %H:%M %Z|agohover

I'm using order="name desc" as part of the changelog documentation pages, and it seems to be ordering by page title instead.

The changelog category is autonumbered, but name desc makes 1 appear at the top of the list (shouldn't it make 2 appear before one?)

Page 1 : starts with A
Page 2 : starts with C

Therefore, name desc is currently sorting by title and is making the second page appear first on list as C comes after A in the alphabet.

last edited on 1252552061|%e %b %Y, %H:%M %Z|agohover by leiger + show more
unfold name desc = title desc by leigerleiger, 1252551939|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
James KanjoJames Kanjo 1252557170|%e %b %Y, %H:%M %Z|agohover

Shane, I had a look at the page and saw a different problem.

The order="name" is working fine, however the functions are incorrectly reversed:

  • order="name desc" is ordering pages in ASCENDING ORDER (oldest to newest, lowest to highest)
  • order="name asc" is ordering pages in DESCENDING ORDER (newest to oldest, highest to lowest)

Just in case somebody missed that… PAGES ARE BEING ORDERED IN THE OPPOSITE ORDER!!!!!


EDIT: Hmm, maybe it's just an autonumbering problem????
This page renders fine


λ James Kanjo | blog | photos | contact

last edited on 1252557872|%e %b %Y, %H:%M %Z|agohover by James Kanjo + show more
unfold Re: name desc = title desc by James KanjoJames Kanjo, 1252557170|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
pieterhpieterh 1252569761|%e %b %Y, %H:%M %Z|agohover

Can you point me to a reproducible case where the ordering is wrong?

Thanks.

unfold Re: name desc = title desc by pieterhpieterh, 1252569761|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
James KanjoJames Kanjo 1252571087|%e %b %Y, %H:%M %Z|agohover

The changelog documentation page


λ James Kanjo | blog | photos | contact

unfold Re: name desc = title desc by James KanjoJames Kanjo, 1252571087|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
pieterhpieterh 1252573237|%e %b %Y, %H:%M %Z|agohover

OK, I've made some tests on the page (see) and am reporting this bug to Michal.

unfold Re: name desc = title desc by pieterhpieterh, 1252573237|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
pieterhpieterh 1252585290|%e %b %Y, %H:%M %Z|agohover

I've made some tests on the page (see) and am reporting this bug to Michal.

And… fixed! You like the new turnaround time on bugs? (Apart from the 9,000 existing ones, which will have to wait a while longer).

unfold Re: name desc = title desc by pieterhpieterh, 1252585290|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
James KanjoJames Kanjo 1252585654|%e %b %Y, %H:%M %Z|agohover

And… fixed! You like the new turnaround time on bugs?

Yes :D

What was the problem, by the way?

Apart from the 9,000 existing ones, which will have to wait a while longer

Is this something the programming community can help out with?


λ James Kanjo | blog | photos | contact

unfold Re: name desc = title desc by James KanjoJames Kanjo, 1252585654|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
pieterhpieterh 1252587388|%e %b %Y, %H:%M %Z|agohover

Is this something the programming community can help out with?

Yes, probably, but much of the code is complex due to Wikidot's use of caching. It's in git and that means we can accept patches.

Personally, I'm ecstatic enough with the help we get from the Wikidot community in other areas. Speaking of which, I moved that themes sandbox cover to the main page. It's not perfect but already pretty nice and the themes site is now much more fun to navigate IMO.

unfold Re: name desc = title desc by pieterhpieterh, 1252587388|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
leigerleiger 1252590259|%e %b %Y, %H:%M %Z|agohover

Aha james… I think you were probably right. Having only made two pages I didn't really pay attention to what the problem was, it just looked like it might be using title instead. Good pick.

And… fixed! You like the new turnaround time on bugs? (Apart from the 9,000 existing ones, which will have to wait a while longer).

Haha, yes.. good turnaround :)

unfold Re: name desc = title desc by leigerleiger, 1252590259|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
James KanjoJames Kanjo 1252593556|%e %b %Y, %H:%M %Z|agohover

Speaking of which, I moved that themes sandbox cover to the main page. It's not perfect but already pretty nice and the themes site is now much more fun to navigate IMO

:-)

If you wanted to have a nice border for the hover image:

span.hover-full a:hover img {
    border: 5px solid #666;
    border-left: none;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius-topleft: 0;
    -webkit-border-top-left-radius: 0;
    -moz-border-radius-bottomleft: 0;
    -webkit-border-bottom-left-radius: 0;
}

λ James Kanjo | blog | photos | contact

unfold Re: name desc = title desc by James KanjoJames Kanjo, 1252593556|%e %b %Y, %H:%M %Z|agohover
Re: name desc = title desc
pieterhpieterh 1252599711|%e %b %Y, %H:%M %Z|agohover

If you wanted to have a nice border for the hover image:

I keep hoping we'll use the forum (hint hint) for discussions of our various projects but in this case it was me that jacked the thread. :-(

Anyhow, CSS is applied and the result is nice!

unfold Re: name desc = title desc by pieterhpieterh, 1252599711|%e %b %Y, %H:%M %Z|agohover
Displaying the "current" tag ?
gerdamigerdami 1252492046|%e %b %Y, %H:%M %Z|agohover

Is there a way to display on a page the current selected tag ?

Example: On page http://community.wikidot.com/start-featured/tag/game-development I would like to display
"Filtered by game-development"

unfold Displaying the "current" tag ? by gerdamigerdami, 1252492046|%e %b %Y, %H:%M %Z|agohover
Re: Displaying the "current" tag ?
GabrysGabrys 1252494132|%e %b %Y, %H:%M %Z|agohover

You can do this now in a very very hacky way using very custom CSS, tables and PagesByTag module.

See: http://chaber.art.pl/system:page-tags/tag/karneol


Piotr Gabryjeluk
visit my blog

unfold Re: Displaying the "current" tag ? by GabrysGabrys, 1252494132|%e %b %Y, %H:%M %Z|agohover
Re: Displaying the "current" tag ?
ErichSteinboeckErichSteinboeck 1252530414|%e %b %Y, %H:%M %Z|agohover

You might create a set of (empty) pages in a separate (autonumbered, if you like) category (e. g. called “tag”) where each page is tagged with one of the tags that you want to show as “Filtered by …”

Then on your landing page, use:

[[module ListPages category="tag" limit="1" tag="@URL"]]
Filtered by %%tags%%
[[/module]]
unfold Re: Displaying the "current" tag ? by ErichSteinboeckErichSteinboeck, 1252530414|%e %b %Y, %H:%M %Z|agohover
How about Some Image Variables?
Ed JohnsonEd Johnson 1252473967|%e %b %Y, %H:%M %Z|agohover

Working on my photo site tonight, I had an idea and as I worked it through I really wished I had access to %%image_first%% or %%image_random%% in my live template. The reason is that I'd like to use a random image from my page as the background for a div block. I then want to overlay a "frame" image on top of that section. You can see the effect I'm going for here:

http://myfamilyphotos.wikidot.com/photos:1

My workaround for the moment is to have the user select one of the images to display in the "slide mount" div by uploading or renaming an image to favorite.jpg.

The code in my live template looks like this:

[[div style="float: left; background-color: transparent; background-image: url(/local--resized-images/%%full_page_name%%/favorite.jpg/small.jpg); ...

If I could change it so this worked:

[[div style="float: left; background-color: transparent; background-image: url(/local--resized-images /%%full_page_name%%/%%image_random%%/small.jpg); ...

it would allow for creating some very dynamic page content!

We have the ability to list random pages. How about adding a way to get a random image? If that's too complicated, maybe an %%image_first%% solution would be easier since it's already part of the image module.

-Ed

unfold How about Some Image Variables? by Ed JohnsonEd Johnson, 1252473967|%e %b %Y, %H:%M %Z|agohover
Re: How about Some Image Variables?
pieterhpieterh 1252475009|%e %b %Y, %H:%M %Z|agohover

I'd actually defined %%image{n}%% for this, took it out after discussion with the team, will now put it back. 'n' could well be 'random'.

unfold Re: How about Some Image Variables? by pieterhpieterh, 1252475009|%e %b %Y, %H:%M %Z|agohover
Q: Parent selector:
gerdamigerdami 1252408711|%e %b %Y, %H:%M %Z|agohover

Parent selector:

  • "=" means with same parent as current page

Q1: Do you mean siblings ?
Q2: How do you emulate ChildPages, i.e. with parent equal current page, without passing the argument via a _template ?

unfold Q: Parent selector: by gerdamigerdami, 1252408711|%e %b %Y, %H:%M %Z|agohover
Re: Q: Parent selector:
pieterhpieterh 1252409458|%e %b %Y, %H:%M %Z|agohover

"=" means with same parent as current page

Yes, this was meant to be siblings. I can see it's confusing. To emulate ChildPages we'd need a specific syntax, since there are no symbols except in templates or ListPages.

Am making those changes now…

unfold Re: Q: Parent selector: by pieterhpieterh, 1252409458|%e %b %Y, %H:%M %Z|agohover
Deprecated modules
gerdamigerdami 1252406177|%e %b %Y, %H:%M %Z|agohover

When a module is signaled as deprecated in the doc, it might be useful to give the code to achieve the same or a similar result.

unfold Deprecated modules by gerdamigerdami, 1252406177|%e %b %Y, %H:%M %Z|agohover
%%tags_linked|pagename%%
ErichSteinboeckErichSteinboeck 1252346586|%e %b %Y, %H:%M %Z|agohover

I propose that pagename in %%_tags_linked|pagename%% and %%tags_linked|pagename%% be defined as follows:

  • pagename results in each tag becoming the link …pagename/tag/name-of-tag (as currently implemented)
  • /pagename/url-parm/url-value results in each tag becoming the link …pagename/url-parm/url-value/tag/name-of-tag (new; multiple url-parm/url-value pairs supported)
  • /pagename/url-parm/ results in each tag becoming the link …pagename/url-parm/name-of-tag (new; trailing “/” suppresses insertion of /tag/)

This would allow to provide any additional parameters needed for ListPages (which is the most probably target for %%tags_linked%%.

As another example /pagename/destination/ would allow linked tags to effectively become links to pages of the same name (in this case the target page wouldn't use ListPages but Redirect with destination dynamically specified on the URL).

We might drop the leading “/” in the two proposed specifications, if in the current implementation pagename is supposed to only support unixified page names (i. e. page names may not include slashes).

unfold %%tags_linked|pagename%% by ErichSteinboeckErichSteinboeck, 1252346586|%e %b %Y, %H:%M %Z|agohover
Re: %%tags_linked|pagename%%
GabrysGabrys 1252349391|%e %b %Y, %H:%M %Z|agohover

I would say, the %%tags_linked|pagename%% should work as a prefix, i.e. the default is:

%%tags_linked|system:page-tags/tag/%%

This can be used to create links to pages in custom category:

%%tags_linked|player:%%

And this let's you pass additional parameters:

%%tags_linked|some-target/category/some-category/tags/%%

So I would prefer this syntax:

%%tags_linked|link_prefix%%

which means tags linking to: {link_prefix}{tag_name} (curly brackets added as decorative part). Link_prefix could even start with http:// to allow other weird kind of stuff.


Piotr Gabryjeluk
visit my blog

unfold Re: %%tags_linked|pagename%% by GabrysGabrys, 1252349391|%e %b %Y, %H:%M %Z|agohover
Re: %%tags_linked|pagename%%
pieterhpieterh 1252350112|%e %b %Y, %H:%M %Z|agohover

Feel free to fix-up the design above, I've started with Erich's suggestions but am going to have to put the kids to bed, and after about 14 hours of Wikidotting, my brain is getting fuzzy. :-)

unfold Re: %%tags_linked|pagename%% by pieterhpieterh, 1252350112|%e %b %Y, %H:%M %Z|agohover
Re: %%tags_linked|pagename%%
GabrysGabrys 1252353929|%e %b %Y, %H:%M %Z|agohover

OK, updated.

My solution is very similar to Erich's, only his had magic addition of /tag/, mine has explicit. I hope it's OK for anyone to write these 5 more letters and thus to gain better understanding of how this mechanism works.


Piotr Gabryjeluk
visit my blog

unfold Re: %%tags_linked|pagename%% by GabrysGabrys, 1252353929|%e %b %Y, %H:%M %Z|agohover
Re: %%tags_linked|pagename%%
gerdamigerdami 1252390125|%e %b %Y, %H:%M %Z|agohover

As of 8 Sep 09, 6:04 GMT, %%tags_linked|pagename%% only works when pagename is actually the name of the page, not the fullname .

Examples that don't work:

  • %%tags_linked|system:page-tags%%
  • %%tags_linked|snow:_start%%
unfold Re: %%tags_linked|pagename%% by gerdamigerdami, 1252390125|%e %b %Y, %H:%M %Z|agohover
Select by date-since: since="date-selector" already implemented ?
gerdamigerdami 1252223352|%e %b %Y, %H:%M %Z|agohover

Same question for Select by date-till: till="date-selector"

Re: Select by date-since: since="date-selector" already implemented ?
pieterhpieterh 1252226915|%e %b %Y, %H:%M %Z|agohover

since= and till= aren't implemented yet, I've marked them in italics. Actually, I'm wondering if the names are accurate. This is a selector on the created date. Perhaps we need a more generic date selection: on created_at, updated_at, commented_at, and the three options, equals, before, after.

Re: Select by date-since: since="date-selector" already implemented ?
gerdamigerdami 1252230147|%e %b %Y, %H:%M %Z|agohover
  • I proposed since for consistency with the search syntax:

To restrict the search by date, add either or both of: since:yyyy-mm-dd and till:yyyy-mm-dd.

  • Why only three options ? Why not 5 ?
    • <
    • <=
    • =
    • >=
    • >
Re: Select by date-since: since="date-selector" already implemented ?
James KanjoJames Kanjo 1252237959|%e %b %Y, %H:%M %Z|agohover

Technically you could achieve that with 3 operators, not 4. I mean, if you want to include pages from January 2010 onwards, rather than date=">=2010.1.1", you could write date=">2009.12.31"
Or instead of date="<=last 28 days", you could write date="<last 27 days"

If the “skipCurrent” option, which includes the current page or not within the results, didn't exist, then there would be a need for 5 operators. But it does exist, so there's no particular need for the extra two.


Hmm, a thought. Instead of "last X days", what if scheduled blog posts could be displayed with "next X days" ???


λ James Kanjo | blog | photos | contact

Re: Select by date-since: since="date-selector" already implemented ?
pieterhpieterh 1252239672|%e %b %Y, %H:%M %Z|agohover

Technically you could achieve that with 3 operators, not 4.

Yes, but it's clumsy to have to write ">2008.12.31" instead of ">=2009".

last edited on 1252243282|%e %b %Y, %H:%M %Z|agohover by James Kanjo + show more
Re: Select by date-since: since="date-selector" already implemented ?
James KanjoJames Kanjo 1252243180|%e %b %Y, %H:%M %Z|agohover

I agree, I was just thinking of the extra effort from a developer's perspective.

Hmm, I made a typo. It should have read '5', not '4'

PS. I like the new DP !


λ James Kanjo | blog | photos | contact

last edited on 1252243465|%e %b %Y, %H:%M %Z|agohover by James Kanjo + show more
Re: Select by date-since: since="date-selector" already implemented ?
gerdamigerdami 1252249196|%e %b %Y, %H:%M %Z|agohover

Oups, I just forgot the 6th operator "<>" !


And generally, why don't we have a NOT operator:
Ex: ListPages category="blog" created_by="-pieterh, -squark"


Ex: ListPages category="blog" created_by="-#marketing"
… where #marketing is a group of users … when groups management is implemented.

Re: Select by date-since: since="date-selector" already implemented ?
pieterhpieterh 1252249981|%e %b %Y, %H:%M %Z|agohover

And generally, why don't we have a NOT operator:

Good question.

Re: Select by date-since: since="date-selector" already implemented ?
pieterhpieterh 1252252133|%e %b %Y, %H:%M %Z|agohover

And the answer is that we don't have operators in general at all. I've made some changes to the yet-to-be-implemented selectors to start to introduce more consistent operators.

Questions
Timothy FosterTimothy Foster 1252156156|%e %b %Y, %H:%M %Z|agohover

Just a few general questions…

1) Do the former syntaxes, like %%page_unix_name%% and %%author%%, still work?
2) Do the delimiters without spaces still work, like order="titleDesc" vs. order="title desc"?
3) Does the category selector allow for @URL?

unfold Questions by Timothy FosterTimothy Foster, 1252156156|%e %b %Y, %H:%M %Z|agohover
Re: Questions
pieterhpieterh 1252157467|%e %b %Y, %H:%M %Z|agohover

I'm not sure about the category selector, try it and I'll update the doc if that is missing. I assume it does work but don't have the code at hand.

Questions 1 and 2: yes, the existing syntax all still works, we did not break anything except %%tags%%.

unfold Re: Questions by pieterhpieterh, 1252157467|%e %b %Y, %H:%M %Z|agohover
@URL for category
Timothy FosterTimothy Foster 1252330038|%e %b %Y, %H:%M %Z|agohover

No, the @URL doesn't work with category. It assumes you mean the category "url".

last edited on 1252330083|%e %b %Y, %H:%M %Z|agohover by Timothy Foster + show more
unfold @URL for category by Timothy FosterTimothy Foster, 1252330038|%e %b %Y, %H:%M %Z|agohover
ListPages created_by
HobStarCSHobStarCS 1252147916|%e %b %Y, %H:%M %Z|agohover

I tied this code here in a live template but if you look here you can see that it only lists the current page.

Any ideas?

[[module ListPages created_by="%%author%%"]]
%%linked_title%%
[[/module]]

**EDIT**

What I'm trying to achieve is, to list all pages created by a particular user, using a live template

last edited on 1252149963|%e %b %Y, %H:%M %Z|agohover by HobStarCS + show more
unfold ListPages created_by by HobStarCSHobStarCS, 1252147916|%e %b %Y, %H:%M %Z|agohover
Re: ListPages created_by
pieterhpieterh 1252150817|%e %b %Y, %H:%M %Z|agohover

This particular selector does not yet work (it is marked in italics on the design page).

I'm updating the docs right now.

unfold Re: ListPages created_by by pieterhpieterh, 1252150817|%e %b %Y, %H:%M %Z|agohover
Re: ListPages created_by
HobStarCSHobStarCS 1252151942|%e %b %Y, %H:%M %Z|agohover

Ah, I see. I'd better get my eyes tested. lol ~©¿©~

It will be VERY useful when it is working!

unfold Re: ListPages created_by by HobStarCSHobStarCS, 1252151942|%e %b %Y, %H:%M %Z|agohover
Offset = n
gerdamigerdami 1252059676|%e %b %Y, %H:%M %Z|agohover

I would like to be able to ListPages, let's say the first n results, then the next ones with a second ListPages (and a shorter displayed format).
Example:

[[module ListPages category="blog" limit="3"]]
+++ %%linked_title%%
by %%author%% %%date%%
%%content%%
tags: %%tags%%
[[/module]]
----
[[module ListPages category="blog" offset="3"]]
+++ %%linked_title%%
[[/module]]
last edited on 1252062035|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold Offset = n by gerdamigerdami, 1252059676|%e %b %Y, %H:%M %Z|agohover
Re: Offset = n
pieterhpieterh 1252140639|%e %b %Y, %H:%M %Z|agohover

Nice idea. I've added that.

unfold Re: Offset = n by pieterhpieterh, 1252140639|%e %b %Y, %H:%M %Z|agohover
@URL Question
Ed JohnsonEd Johnson 1252016879|%e %b %Y, %H:%M %Z|agohover

order="rating desc"

What is the format for our URL if order allows a space?

-Ed

unfold @URL Question by Ed JohnsonEd Johnson, 1252016879|%e %b %Y, %H:%M %Z|agohover
Re: @URL Question
pieterhpieterh 1252055649|%e %b %Y, %H:%M %Z|agohover

I assume, %20 in place of the space. This would apply to all special characters passed in URL arguments (%nn, where nn is the hex value of the character). If this does not work, we'll make it work.

unfold Re: @URL Question by pieterhpieterh, 1252055649|%e %b %Y, %H:%M %Z|agohover
System Default?
AsheAshe 1252002455|%e %b %Y, %H:%M %Z|agohover

What does 'system default' mean in 'Page visible tags linked to system default'?

unfold System Default? by AsheAshe, 1252002455|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
pieterhpieterh 1252055449|%e %b %Y, %H:%M %Z|agohover

I meant 'system:page-tags', the same as clicking on the tags shown at the bottom of the page. Will fix this.

unfold Re: System Default? by pieterhpieterh, 1252055449|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
AsheAshe 1252070652|%e %b %Y, %H:%M %Z|agohover

What I would like to see is a way to have a listed tag act like a link to a page of the same name. For example, the tag 'blog' acting as if you'd written [[[blog]]]. Or, the set 'blog wikidot forum' behaving like '[[[blog]]] [[[wikidot]]] [[[forum]]]'.

last edited on 1252070818|%e %b %Y, %H:%M %Z|agohover by Ashe + show more
unfold Re: System Default? by AsheAshe, 1252070652|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
pieterhpieterh 1252138788|%e %b %Y, %H:%M %Z|agohover

Interesting. What's the use case for this?

unfold Re: System Default? by pieterhpieterh, 1252138788|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
AsheAshe 1252252446|%e %b %Y, %H:%M %Z|agohover

I help maintain a companion website for a text-based RPG, and one thing we are looking at doing is overhauling our system for posting scenes. We can't completely automate it without the ability to custom-set page creation dates (because RP doesn't always happen in real-world chronological order), but tagging log pages with participant names and then being able to use %%tags%% to generate the list of participants in any situation with links to their individual character pages would be extremely useful. We currently do page links manually, and we could still do that using a content separator, but it would be very elegant (centralize several steps, be more inherently flexible) if it worked just by tags.

(Tangentially this is also why I asked for capitalized tags on the 'We Need' list, but I think the crosslinks are actually more important.)

An example of the current system is here: http://string-theory.wikidot.com/logs:september09

And an example of what I would eventually like to implement is here: http://rhapsody.wikidot.com/logpage:august09

…though you really need the template to see the code: http://rhapsody.wikidot.com/logpage:_template.

Characters also generally have a personal timeline on their own pages, with similar crosslinks to the pages of others who participated in any given scene.

last edited on 1252253144|%e %b %Y, %H:%M %Z|agohover by Ashe + show more
unfold Re: System Default? by AsheAshe, 1252252446|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
GabrysGabrys 1252329528|%e %b %Y, %H:%M %Z|agohover

It's very interesting, but quite rare situation. You can do similar thing, with [[iftags]] in your template. So if page has tag blog, it also shows a link to page blog, etc.


Piotr Gabryjeluk
visit my blog

unfold Re: System Default? by GabrysGabrys, 1252329528|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
gerdamigerdami 1252332084|%e %b %Y, %H:%M %Z|agohover

@Gabrys:
We have reported (ticket:350) that the [[iftags]] statement does not work within ListPages, when separate="no" is specified, as Ashes proposes to use in http://rhapsody.wikidot.com/logpage:_template.

unfold Re: System Default? by gerdamigerdami, 1252332084|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
GabrysGabrys 1252333415|%e %b %Y, %H:%M %Z|agohover

Iftags won't work with separate="false", because in separate="false" mode wiki source is parsed after joining all results, so the context for every syntax token like image, iftags, etc is page the ListPages in on and not each matched page. But iftags with no separate="false" works OK.

@Ashe: solution to your problem can be using some customization to system:page-tags page, for example:

if "gabrys" is a player in your game and as participant he tags some pages with his name, there are pages tagged "gabrys". You want to show "player:gabrys" page when clicked on "gabrys" tag. You can do something like this:

On page system:page-tags replace the module TagCloud and module PagesByTag with:

[[module ListPages tags="@URL" category="player"]]
+ Player %%title%%

%%content%%
[[/module]]

+ Games
[[module ListPages tags="@URL" category="games"]]
%%title_linked%%

%%content%%
[[/module]]

You would need to also tag player:gabrys page with "gabrys" tag, so that clicking on a tag takes you to system:page-tags, which in case a page in player category is also tagged with it, shows you mainly the player page followed by other pages tagged by his tag (in this example his games).


Piotr Gabryjeluk
visit my blog

last edited on 1252333519|%e %b %Y, %H:%M %Z|agohover by Gabrys + show more
unfold Re: System Default? by GabrysGabrys, 1252333415|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
AsheAshe 1252333926|%e %b %Y, %H:%M %Z|agohover

@Gabrys' first post:

I could do that for the simple 'blog wikidot forum' example, yes, but on a site with something like 175 different individual character pages it becomes quite prohibitive to make an iftags for each one.

Although as I think about it, there might be a workaround I can try. The only problem is that, as Gerdami said, iftags doesn't work with separate=false. But I'll take your suggestion and go play with it.

Yes, my application is a niche use, but I think if the capability was there it would be used for others I can't imagine offhand also.

@Gabrys' second post:

I'm not sure you're following what I want to do with the links, or else I'm not following your proposed solution at all.

I want to take a ListPages-generated table that has among its columns one called 'Participants'. In each 'Participants' cell I want a list of names, such as might be generated by %%tags%%, and each one of those names to link directly to the corresponding character wikipage. I don't want to involve the system:page-tags intermediate step at all.

I think that I could actually generate this list of links with ListPages and iftags code, but that requires recursive function.

last edited on 1252337060|%e %b %Y, %H:%M %Z|agohover by Ashe + show more
unfold Re: System Default? by AsheAshe, 1252333926|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
GabrysGabrys 1252334654|%e %b %Y, %H:%M %Z|agohover

Read the second suggestion. The only thing you would need to change is tagging all player:XXX pages with corresponding XXX tags and the system:page-tags page (or you can create a custom one using my suggestions and use the new %%tags|tag-target-page%% syntax where you want to use it).


Piotr Gabryjeluk
visit my blog

unfold Re: System Default? by GabrysGabrys, 1252334654|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
AsheAshe 1252337182|%e %b %Y, %H:%M %Z|agohover

I edited my previous post to include a reply to that one.

I don't understand what you're suggesting, I'm afraid. Can you point me to an example?

unfold Re: System Default? by AsheAshe, 1252337182|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
GabrysGabrys 1252340208|%e %b %Y, %H:%M %Z|agohover

Let's make this really really simple.

Let's use tags ONLY for players. Tag = player.

Player page = page in player category, for example:

  • Player name: "gabrys"
  • Player page: "player:gabrys"
  • Player tag: "gabrys"

Make then page called player with the following content:

[[module ListPages category="player" tags="@URL"]]
+ %%title%%

%%content%%

[/%%fullname%%/edit/true edit this page]
[[/module]]

This page will show player's page. It's not the same as player:name, but almost the same. It will display page in category player which has tag that is passed in URL, for example yoursite.wikidot.com/player/tag/gabrys will make ListPages display only "player:gabrys" page (as long as "player:gabrys" page is tagged "gabrys".

Now, replace %%tags_linked%% in your templates with %%tags_linked|player%% and you're done.

If some page was tagged gabrys, gabrys will appear in %%tags_linked%% and will link to yoursite.wikidot.com/player/tag/gabrys. The page will display the only page in category player that is tagged "gabrys", the "player:gabrys" page. There will be the title, the content and edit link. The only thing really different would be the URL, which will be player/tag/gabrys and not player:gabrys. The rest is cosmetical and can be tuned with CSS.

I hope you understand now.

(The only requirement for this setup to work is tagging each player's page with their name).


Piotr Gabryjeluk
visit my blog

unfold Re: System Default? by GabrysGabrys, 1252340208|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
pieterhpieterh 1252344214|%e %b %Y, %H:%M %Z|agohover

The only requirement for this setup to work is tagging each player's page with their name.

That is doable, but it only works to generate a ListPages block. So to go from a general list of pages, you would get to a list of player pages, and from there to the specific player page. What Ashe wants is that from a ListPages block we can jump straight to the player pages.

Now it may be more flexible (e.g. you can tag several pages with the same player tag) but it's unintuitive (obviously, given the difficulty in understanding).

I'd prefer that such functionality be explicit. So, if we want tags to link to pages with the identical names, we need to specify:

  1. What those pages are called, and in what category
  2. How %%linked_tags%% knows to link to that page rather than the taglist

For me, it is in fact unnecessary to link to an intermediate page at all, because any "list of pages with this tag" I can generate using ListPages.

So, here is an idea. If the tag is formatted as a category:pagename ("state:_open", "player:gabrys") then the %%tags_linked%% will automatically link to that page instead of the intermediate page.

unfold Re: System Default? by pieterhpieterh, 1252344214|%e %b %Y, %H:%M %Z|agohover
Re: System Default?
AsheAshe 1252410268|%e %b %Y, %H:%M %Z|agohover

I like that idea, and the flexibility in that not all tags would have to link.

unfold Re: System Default? by AsheAshe, 1252410268|%e %b %Y, %H:%M %Z|agohover
page_unix_name
leigerleiger 1251978500|%e %b %Y, %H:%M %Z|agohover

Shouldn't the property "name" be "page_unix_name" & "full_page_name" for consistency?

http://www.wikidot.com/doc:templates

last edited on 1251978664|%e %b %Y, %H:%M %Z|agohover by leiger + show more
unfold page_unix_name by leigerleiger, 1251978500|%e %b %Y, %H:%M %Z|agohover
Re: page_unix_name
pieterhpieterh 1251979137|%e %b %Y, %H:%M %Z|agohover

Shouldn't the property "name" be "page_unix_name" & "full_page_name" for consistency?

We're changing it to 'name' and 'fullname' so we can do 'parent_name' and 'parent_fullname' for consistency. The old names will remain but be deprecated and removed from the documentation.

unfold Re: page_unix_name by pieterhpieterh, 1251979137|%e %b %Y, %H:%M %Z|agohover
Order by
Steven HeynderickxSteven Heynderickx 1251819248|%e %b %Y, %H:%M %Z|agohover

I would like to see it expanded with the function to order by %%content{x}%%…
@ James order="content{x}Asc" and if I could give content{x} a name it would be "my order" of "my key". But since Pieter could understand me… maybe next time ask for more info in stead of saying that I don't make sense.

For example: I wish to generate a list of links to pages in the side menu. But I want to decide the order… not alphabetically, not by creation, not by… BUT My order. If I would use pagetree it will order them alpabetically by pagetitle… wich is maybe to long for a menu and not the right order.

In addition, but this is off topic. I would like to be able to [[include (category:)pagename content=3]], so that if I made some page using a :_template I could select a part of that page. To do this now you need to do complicated stuff with the remark syntax. It is possible at this moment if i use the listpages, but since it can not be used recursively the NEW include would be a better option

last edited on 1251875155|%e %b %Y, %H:%M %Z|agohover by Steven Heynderickx + show more
unfold Order by by Steven HeynderickxSteven Heynderickx, 1251819248|%e %b %Y, %H:%M %Z|agohover
Re: Order by
James KanjoJames Kanjo 1251854052|%e %b %Y, %H:%M %Z|agohover

I'm afraid you're not making any sense. Order by… My order?

You should give a fictional syntax example to demonstrate a functionality that doesn't exist. If I wanted another order variable, it would be order="nameAsc" for the page's UNIX name (not page title, the page's URL name).


λ James Kanjo | blog | photos | contact

unfold Re: Order by by James KanjoJames Kanjo, 1251854052|%e %b %Y, %H:%M %Z|agohover
Re: Order by
pieterhpieterh 1251866280|%e %b %Y, %H:%M %Z|agohover

Order by… My order?

Steven means, "order the way I want, using any arbitrary value from the page". I.e. %%content{2}%% could be the zip code.

The problem, Steven, is that it can become very expensive to resort long lists like this. We may implement that when we have forms, but there would be restrictions. Either, you'd need to define the field as a key beforehand, or else the maximum length of the ListPages would be limited.

unfold Re: Order by by pieterhpieterh, 1251866280|%e %b %Y, %H:%M %Z|agohover
order by key?
Steven HeynderickxSteven Heynderickx 1251874384|%e %b %Y, %H:%M %Z|agohover

Pieter you understand me. I understand that this can cause problems for your servers. So yes your proposition is a good one and I can live with it. Why don't we include a %%content{key}%% field wich can only hold 10 or 20 characters and is maybe delimited with "_ _ _ _" in stead of "===="… No maybe even better… If you indicate the field with "_ _ _ _" the parser knows that the following field is an "order by"-field, so he makes an extra field in the wikidot-database (wich is a key-field) an inserts the first 20 characters of this field.

So a template and a page like this would become the following

http://ordermystuff.wikidot.com/adress:_template

your name : %%content{1}%%
your ardess : %%content{2}%% %%content{3}%%
your telephone :%%content{4}%%
_ _ _ _
[--! The persons name here--]
_ _ _ _
[--! The persons streetname here --]
_ _ _ _
[--! The persons zipcode here --]
====
[--! the persons telephone --]

http://ordermystuff.wikidot.com/ardess:Arnold_Schwarzenegger

_ _ _ _
Arnold_Schwarzenegger
_ _ _ _
Hollywood blvd.
_ _ _ _
California 26772
====
555 123 007

this would become something like

key 1 content 1 key 2 content 2 key3 content 3 content 4
arnold Arnold Schwarzenegger hollyw Hollywood blvd. Califo California 26772 555 123 007
sylves Silvester Stallone hollyw

The ListPage statement could become

[[module ListPages order="key2Asc"]]
last edited on 1251878870|%e %b %Y, %H:%M %Z|agohover by Steven Heynderickx + show more
unfold order by key? by Steven HeynderickxSteven Heynderickx, 1251874384|%e %b %Y, %H:%M %Z|agohover
Re: order by key?
pieterhpieterh 1251979189|%e %b %Y, %H:%M %Z|agohover

We're working on a forms system that will do this, but properly.

unfold Re: order by key? by pieterhpieterh, 1251979189|%e %b %Y, %H:%M %Z|agohover
RECURSIVELY??
Steven HeynderickxSteven Heynderickx 1251123041|%e %b %Y, %H:%M %Z|agohover

I do not dare to ask but will ListPages be recursively in the future?

unfold RECURSIVELY?? by Steven HeynderickxSteven Heynderickx, 1251123041|%e %b %Y, %H:%M %Z|agohover
Re: RECURSIVELY??
pieterhpieterh 1251136018|%e %b %Y, %H:%M %Z|agohover

Yes, this is one of our goals. All modules to be nestable where it makes sense. We'd also like to simplify the syntax so it becomes [[ListPages ...]] without the 'module' keyword.

unfold Re: RECURSIVELY?? by pieterhpieterh, 1251136018|%e %b %Y, %H:%M %Z|agohover
pieterhpieterh 1251112378|%e %b %Y, %H:%M %Z|agohover

OK, the range selector is now implemented live. I'm going to use this in the template sites where we now use NextPage and PreviousPage.

unfold by pieterhpieterh, 1251112378|%e %b %Y, %H:%M %Z|agohover
Re:
leigerleiger 1251164496|%e %b %Y, %H:%M %Z|agohover

So… basically it's just ListPages, limit=1, range=before / range=after ?

unfold Re: by leigerleiger, 1251164496|%e %b %Y, %H:%M %Z|agohover
pieterhpieterh 1251186075|%e %b %Y, %H:%M %Z|agohover

basically it's just ListPages, limit=1, range=before / range=after ?

That's it. You can see that in http://issuetracker-template.wikidot.com/issue:_template. Lets us do next/previous but properly filtering on tags, parent page, etc.

Which reminds me, we can now make the forum next/previous work properly as well.

unfold by pieterhpieterh, 1251186075|%e %b %Y, %H:%M %Z|agohover
Re:
ErichSteinboeckErichSteinboeck 1251190029|%e %b %Y, %H:%M %Z|agohover

Pieter, can we extend the range selector (“before,” “after,” “others”) to “current” which would just list the current page? This would help in building a navigation: listing all pages before the current page, then the current page — probably highlighted, and all pages after the current page.

unfold Re: by ErichSteinboeckErichSteinboeck, 1251190029|%e %b %Y, %H:%M %Z|agohover
pieterhpieterh 1251191783|%e %b %Y, %H:%M %Z|agohover

That's kind of redundant: just use %%title%% etc. You are already on the current page.

unfold by pieterhpieterh, 1251191783|%e %b %Y, %H:%M %Z|agohover
Re:
ErichSteinboeckErichSteinboeck 1251318589|%e %b %Y, %H:%M %Z|agohover

%%title%% etc. work in a live template only, not on any specific pages (e. g. nav:side)

unfold Re: by ErichSteinboeckErichSteinboeck, 1251318589|%e %b %Y, %H:%M %Z|agohover
Re: range="current"
ErichSteinboeckErichSteinboeck 1252065516|%e %b %Y, %H:%M %Z|agohover

An example of the usefulness of range="current" would be a “This page was last updated on date/time” remark on a page.

[[module ListPages range="current"]]
This page was last updated on %%updated_at|%c|agohover%%
[[/module]]

This can now be done only through a live template (which means you can't use it inline with page content) or by tagging the current page with a unique tag.

unfold Re: range="current" by ErichSteinboeckErichSteinboeck, 1252065516|%e %b %Y, %H:%M %Z|agohover
Re: range="current"
James KanjoJames Kanjo 1252066858|%e %b %Y, %H:%M %Z|agohover

Yes indeed. This would effectively be the long-desired “universal page variables” that we've been wishing for.


λ James Kanjo | blog | photos | contact

unfold Re: range="current" by James KanjoJames Kanjo, 1252066858|%e %b %Y, %H:%M %Z|agohover
Order by pagename
James KanjoJames Kanjo 1251019932|%e %b %Y, %H:%M %Z|agohover

This is really useful for numbered pages! For example, with the design for Wikidot calendars, we wouldn't be able to list all events in the chronological time-line order that they happen (we are limited to ordering by creation/title, and the title is useful for other things).


λ James Kanjo | blog | photos | contact

unfold Order by pagename by James KanjoJames Kanjo, 1251019932|%e %b %Y, %H:%M %Z|agohover
ordering by content?
kawinakawina 1250911130|%e %b %Y, %H:%M %Z|agohover

would it be possible to allow for ordering by content? for instance, in pages whose contents are items in a bibliographic entry, I would like to be able to list pages by author (content{1}), title (content{2}), year (content{3}), etc. Does anybody else think this would be a useful feature?



Eduardo R. Ribeiro
Macro-Jê linguistics, &c.

unfold ordering by content? by kawinakawina, 1250911130|%e %b %Y, %H:%M %Z|agohover
Re: ordering by content?
pieterhpieterh 1250930732|%e %b %Y, %H:%M %Z|agohover

Useful, yes, but problematic with the current content sections. Sorting large numbers of pages is expensive (slow). We're working on a data forms functionality which lets you define named values in the page, more fun for things like bibliographic entries. And we should be able to sort on specific fields, afterwards.

unfold Re: ordering by content? by pieterhpieterh, 1250930732|%e %b %Y, %H:%M %Z|agohover
Re: ordering by content?
kawinakawina 1251001328|%e %b %Y, %H:%M %Z|agohover

I'm really looking forward to the forms funcionality! Any chance it will come out this year? And will it allow for file attachments?



Eduardo R. Ribeiro
Macro-Jê linguistics, &c.

unfold Re: ordering by content? by kawinakawina, 1251001328|%e %b %Y, %H:%M %Z|agohover
Re: ordering by content?
pieterhpieterh 1251018766|%e %b %Y, %H:%M %Z|agohover

We'll see. Making promises is always asking for trouble.

unfold Re: ordering by content? by pieterhpieterh, 1251018766|%e %b %Y, %H:%M %Z|agohover
What date ?
gerdamigerdami 1250847184|%e %b %Y, %H:%M %Z|agohover

Select by date. Fine but which one ? Creation_date or Last_edit_date ?
Both should be selectable.


Just come back from a search test: same issue: the search doc says

To restrict the search by date, add either or both of: since:yyyy-mm-dd and till:yyyy-mm-dd

the date criteria is actually the creation date (doc should tell this)


Note the difference of date format when compared to the one proposed above for ListPages

unfold What date ? by gerdamigerdami, 1250847184|%e %b %Y, %H:%M %Z|agohover
%%author_edited%%
leigerleiger 1250823245|%e %b %Y, %H:%M %Z|agohover

There's an %%editor%% and %%editor_linked%% up there.

Just thought I'd point out that when using templates, %%author_edited%% is used to represent the name of the last person to edit the page. This is similar to %%author%%, the page creator.

Instead of using %%editor%%, shouldn't it be %%author_edited%% ?

unfold %%author_edited%% by leigerleiger, 1250823245|%e %b %Y, %H:%M %Z|agohover
Misssing %%properties%%
gerdamigerdami 1250771863|%e %b %Y, %H:%M %Z|agohover

%%date%% i.e. creation date and time
%%date_edited%% i.e. last edit date and time
%%editor%% the last guy who edited the page
%%editor_linked%%

unfold Misssing %%properties%% by gerdamigerdami, 1250771863|%e %b %Y, %H:%M %Z|agohover
Re: Misssing %%properties%%
pieterhpieterh 1250785777|%e %b %Y, %H:%M %Z|agohover

I've opened the page to editing, so feel free now to add these in.

unfold Re: Misssing %%properties%% by pieterhpieterh, 1250785777|%e %b %Y, %H:%M %Z|agohover
multiple sorting criteria ?
gerdamigerdami 1250228438|%e %b %Y, %H:%M %Z|agohover

ex1: order="date desc, page_name asc", with date = date (without time)

ex2: order="rating desc, author asc",

… and a groupBy="date", which would add a break (blank line or whatever) between groups


Question about: "name Order by page name" : is name the current %%page_name%% ?

last edited on 1250229041|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold multiple sorting criteria ? by gerdamigerdami, 1250228438|%e %b %Y, %H:%M %Z|agohover
Re: multiple sorting criteria ?
pieterhpieterh 1250325581|%e %b %Y, %H:%M %Z|agohover

I originally wrote the proposal with multiple sorting criteria and then removed it, out of pity for the database engine.

unfold Re: multiple sorting criteria ? by pieterhpieterh, 1250325581|%e %b %Y, %H:%M %Z|agohover
tagTarget vs target
gerdamigerdami 1250226617|%e %b %Y, %H:%M %Z|agohover

ListPages uses tagTarget=landing-page
while
TagCould uses target=landing-page
=> inconsistency to be resolved, thanks.

unfold tagTarget vs target by gerdamigerdami, 1250226617|%e %b %Y, %H:%M %Z|agohover
Re: tagTarget vs target
pieterhpieterh 1250325398|%e %b %Y, %H:%M %Z|agohover

Ack. Shorter is sweeter.

unfold Re: tagTarget vs target by pieterhpieterh, 1250325398|%e %b %Y, %H:%M %Z|agohover
Re: tagTarget vs target vs targetPage
gerdamigerdami 1250417502|%e %b %Y, %H:%M %Z|agohover

… and also PageCalendar which currently supports startPage or targetPage

unfold Re: tagTarget vs target vs targetPage by gerdamigerdami, 1250417502|%e %b %Y, %H:%M %Z|agohover
Re: tagTarget vs target vs targetPage
pieterhpieterh 1250418115|%e %b %Y, %H:%M %Z|agohover

Done.

unfold Re: tagTarget vs target vs targetPage by pieterhpieterh, 1250418115|%e %b %Y, %H:%M %Z|agohover
Use "=" instead of "."
ErichSteinboeckErichSteinboeck 1250191844|%e %b %Y, %H:%M %Z|agohover

> Category selector … "." means current category (default)
> Tag selector … "=" means pages with same tags as this page

If a tag selector uses “=” to signal “same,” then the category selector should also use “=” to do so.

unfold Use "=" instead of "." by ErichSteinboeckErichSteinboeck, 1250191844|%e %b %Y, %H:%M %Z|agohover
Re: Use "=" instead of "."
leigerleiger 1250209385|%e %b %Y, %H:%M %Z|agohover

I agree. Didn't notice that earlier! :)

unfold Re: Use "=" instead of "." by leigerleiger, 1250209385|%e %b %Y, %H:%M %Z|agohover
Re: Use "=" instead of "."
pieterhpieterh 1250325360|%e %b %Y, %H:%M %Z|agohover

Maybe. The dot means "current" whereas the equals means "any of the same as". Not quite the same semantics and I don't like using the same syntax. For example we might want to add 'tags="."' meaning "exactly the same tags".

unfold Re: Use "=" instead of "." by pieterhpieterh, 1250325360|%e %b %Y, %H:%M %Z|agohover
%%short%% and %%preview%%
gerdamigerdami 1250077369|%e %b %Y, %H:%M %Z|agohover
  • %%short%%, sometimes, is not very short, i.e. it displays a whole lengthy paragraph,
    • %%short%% has currently an alias, %%summary%% which would keep its current functionality
    • %%short%% would be a %%summary%% shortened by an arbitrary number of digits, 72 as for Cobol code :)
  • %%preview%% and %%preview(200)%% do the job, but sometimes display more than a paragraph, and blank lines in between
    • since %%preview%% is just a preview, blank lines between paragraphs should be deleted and replaced by " … " à la manière de Google
unfold %%short%% and %%preview%% by gerdamigerdami, 1250077369|%e %b %Y, %H:%M %Z|agohover
Re: %%short%% and %%preview%%
pieterhpieterh 1250101029|%e %b %Y, %H:%M %Z|agohover

Wow. First, I'm glad I'm not the only person here who is traumatized by the number 72. Do 8 and 30 also make you shift in your seat?

The summary should just work properly: limit to N chars and be cleanly formatted as one paragraph. Preview is a hack and should IMO be removed.

unfold Re: %%short%% and %%preview%% by pieterhpieterh, 1250101029|%e %b %Y, %H:%M %Z|agohover
Re: Additional functionality
gerdamigerdami 1250073169|%e %b %Y, %H:%M %Z|agohover
  • Introduce new tags such as [[ListPagesHide]] this text [[/ListPagesHide]] to prevent display by ListPages of this text

Reason: sometimes, ListPages displays unwanted stuff such as [[include sentence]], not rendered, or stuff from the _template.

unfold Re: Additional functionality by gerdamigerdami, 1250073169|%e %b %Y, %H:%M %Z|agohover
Re: Additional functionality
pieterhpieterh 1250087876|%e %b %Y, %H:%M %Z|agohover

Can you show me an example of this? It sounds like a bug,

unfold Re: Additional functionality by pieterhpieterh, 1250087876|%e %b %Y, %H:%M %Z|agohover
Re: Additional functionality
gerdamigerdami 1250091488|%e %b %Y, %H:%M %Z|agohover

With ListPages : http://babel-template.wikidot.com/system:page-tags/tag/_system
With Pages : [[module Pages preview="true"]]
Look for the page "Page Tags" for example in http://handbook.wikidot.com/system:list-all-pages

last edited on 1250091827|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold Re: Additional functionality by gerdamigerdami, 1250091488|%e %b %Y, %H:%M %Z|agohover
leigerleiger 1250037226|%e %b %Y, %H:%M %Z|agohover

We need showHidden="true" for both ListPages and CountPages

unfold by leigerleiger, 1250037226|%e %b %Y, %H:%M %Z|agohover
Parent how does it work?
Steven HeynderickxSteven Heynderickx 1249742699|%e %b %Y, %H:%M %Z|agohover

I wish to retrieve the parent name of a page … with the order function of the listPages Module, this is not yet possible I believe (for now I hope). Because with the listPages-module you can only get properties from the page itself, because there is no "y" in the column from "done".

Comments is also not fully working I believe. I use

[[module ListPages category="begripoverleg" order="comments"]]
[[[%%page_unix_name%%|%%content{2}%%]]] (%%comments%%)
[[/module]]

And it does not order them by comments (right column @ http://ethischforum.wikidot.com/stelling:1-1-1-1 for example) I must say I use comments on page… so this is not a forum page !!

unfold Parent how does it work? by Steven HeynderickxSteven Heynderickx, 1249742699|%e %b %Y, %H:%M %Z|agohover
Re: Parent how does it work?
leigerleiger 1249743422|%e %b %Y, %H:%M %Z|agohover

http://www.wikidot.com/doc:listpages-module

Allowed values for the order attribute are as follows:

  • dateCreatedDesc
  • dateCreatedAsc
  • dateEditedDesc
  • dateEditedAsc
  • titleDesc
  • titleAsc
  • ratingDesc
  • ratingAsc
  • pageLengthAsc
  • pageLengthDesc
  • random
  • @URL
last edited on 1249743455|%e %b %Y, %H:%M %Z|agohover by leiger + show more
unfold Re: Parent how does it work? by leigerleiger, 1249743422|%e %b %Y, %H:%M %Z|agohover
Re: Parent how does it work?
pieterhpieterh 1249743558|%e %b %Y, %H:%M %Z|agohover

Sorry, the above list is not documentation of what exists but what I'd like to get. The 'Done' column is what's already present. I could add a second column to show whether the orderBy is already done or not.

unfold Re: Parent how does it work? by pieterhpieterh, 1249743558|%e %b %Y, %H:%M %Z|agohover
Rephrasing the question... do you have a parent? Any comments?
Steven HeynderickxSteven Heynderickx 1249748699|%e %b %Y, %H:%M %Z|agohover

I read in the above list that

Property Done Key
%%parent_name%% - Y
%%comments%% Y Y

'Done' means it's already there, 'Key' means the orderBy argument would accept this property name.

I also read "4 - ListPages" as title

Hence my conclusion:

There exists a module called listPages with wich one can order a list of pages. A page from that list could have a comment (on page) and since %%comments%% is marked as "key" and "key" means "the orderBy argument would accept this property name", I would assume that the page with the most comments (on Page) would be on top of the list.

I tried this, but it does not seem to work your honor. Here for I introduce exibit A

[[module ListPages category="begripoverleg" order="comments"]]
[[[%%page_unix_name%%|%%content{2}%%]]] (%%comments%%)
[[/module]]

Futhermore I wish to know whether my client has a parent. Naturally everybody has two parents but since my client is a wikidot-page it can only have one, so dear members of the jury, to find out wich page that would be should not be a very difficult job.

If one would order the possible pages by "parent", wich is possible the defence says - what would this order be? pages with parents on top and orphant-pages at the bottom?

Please help me members of the jury and give my client his rightfull parent back and a list of popular comments

Re: Rephrasing the question... do you have a parent? Any comments?
pieterhpieterh 1249767962|%e %b %Y, %H:%M %Z|agohover

:-) The defendant is found guilty of being far too funny for a summer weekend. Sentenced to hard labor writing Wikidot syntax with no wysiwyg editor.

Yeah, you're not the only person who wants ordering by comments. Adjourned!

Re: Rephrasing the question... do you have a parent? Any comments?
leigerleiger 1249783305|%e %b %Y, %H:%M %Z|agohover

Definitely got a laugh out of that =)

Unfortunately the Key column is for what the orderBy argument would accept once this is implemented, and not what it does accept already.

leigerleiger 1249694586|%e %b %Y, %H:%M %Z|agohover

For consistency:

  • All property names can be spelled_like_this OR spelledLikeThis.
  • Property names are identical when used in content and in orderBy.

hahaha! =)

As for the table … I don't understand what the "Key" column is for?
And why are some marked as " - " for both Done and Key ?

last edited on 1249694620|%e %b %Y, %H:%M %Z|agohover by leiger + show more
unfold by leigerleiger, 1249694586|%e %b %Y, %H:%M %Z|agohover
Re: Key
gerdamigerdami 1249716119|%e %b %Y, %H:%M %Z|agohover

I don't understand what the "Key" column is for?

In a relational database system, when a field is set as a key, it allows to retrieve and sort database records very quickly.

unfold Re: Key by gerdamigerdami, 1249716119|%e %b %Y, %H:%M %Z|agohover
Page tags: _closed
page_revision: 75, last_edited: 1257343661|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License