Listing

Listing macros use Elephant context tree in order to list related contexts.

Macro

Description

{@list:behavioural_keywords:
navigational_keywords:selection_keywords}

Renders a list of selectable contexts

{@anchor:behavioural_keywords:
navigational_keywords:selection_keywords}

Renders a line of selectable contexts

Understanding what behavioural keywords are

Behavioural keywords stand for keywords controlling how information displays. The way behaviours will extend in future versions might be controlled in this section.

Behavioural keyword

Description

verbose

Writes the whole path to context, starting from current context.

popup

Popup effect on resulting links is to open a popup instead of opening a new context.

hidden

Hidden contexts will show, even if protected.

external

Links will open on a new tab or window.

Understanding what navigational keywords and selection keywords mean


Navigational keywords end up as a list, colon separated, of keywords pointing to existing contexts. As starting point, path_to_contexts initializes to current context, that is, the web page where macro displays.

Here comes a brief description of what each keyword does and after some clear examples:

Navigation keywords move current selection from context to context.

Navigation keyword

Description

parent

Moves to current selection's parent

root

Moves to root context

level

Moves to ancestor[level]

locate

Moves next token path

match

Moves to matching context from current selection

Selection keywords actually return contexts, one or several. A zero results it's considered an error an macro will displays with m_error class, which defaults to red color and a warning image. Otherwise, macro expands into m_list class.

Render keyword

Description

self

Returns current selection

children

Returns current selection's children

all

Returns all descendant contexts

leaf

Returns all descendant contexts having no children

ancestors

Returns current selection's ancestors

siblings

Returns current selection's siblings, including itself

search

Returns matching contexts from current selection

Learning by example

Macro

Description

{@list:self}


{@anchor:self}
Listing
{@anchor:popup:self}
Listing

self returned current selection which defaults to current context, popup shows this page as a popup window

{@list:parent:children}


{@anchor:parent:children}
[ Content, Listing, Navigational, Modules, With readers, Generic ]

parent took us into current context its parent, while children returned a list of its children

Printer version
English06/08/11 18:01Lluís Turró Cutiller
English08/17/11 20:50Lluís Turró Cutiller
English09/06/11 09:30Lluís Turró Cutiller
English09/16/11 12:59Lluís Turró Cutiller
English01/08/18 10:19Lluís Turró Cutiller