From: <de...@de...> - 2017-02-12 00:37:31
|
Author: PeterThoeny Date: 2017-02-12 00:35:49 +0000 (Sun, 12 Feb 2017) New Revision: 30307 Trac url: http://develop.twiki.org/trac/changeset/30307 Modified: twiki/trunk/core/data/TWiki/TWikiPreferences.txt Log: Item7774: PARENTBC setting: Omit double-angle separator if no parent Modified: twiki/trunk/core/data/TWiki/TWikiPreferences.txt =================================================================== --- twiki/trunk/core/data/TWiki/TWikiPreferences.txt 2017-01-27 13:42:31 UTC (rev 30306) +++ twiki/trunk/core/data/TWiki/TWikiPreferences.txt 2017-02-12 00:35:49 UTC (rev 30307) @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="TWikiContributor" date="1456811560" format="1.1" version="$Rev$"}% +%META:TOPICINFO{author="TWikiContributor" date="1486858790" format="1.1" version="$Rev$"}% ---+!! <nop>%WIKITOOLNAME% Site-Level Preferences This topic defines __site-level__ settings that apply to all users and webs on this TWikiSite. @@ -315,7 +315,7 @@ * Add =%<nop>PARENTBC%= to a heading of a topic to show the breadcrumb of its parents. Parent topics are linked, topic names are shown spaced out in a smaller font, and are separated by =»= quotes. In addition, a =parentlist= SetGetPlugin variable is set to the parent list, and a =parent= variable is set to the immediate parent. This can be retrieved later in the topic using =%<nop>GET{parentlist}%= and =%<nop>GET{parent}%=, respectively. * Example raw text:%BR% =---+ %<nop>PARENTBC% Myself and me= * Expands to: <h1> <span style="font-size: 58%"> [[%TOPIC%][Grandma And Granpa]] » [[%TOPIC%][Mother And Father]] » </span> Myself and me</h1> - * Set PARENTBC = <span style="font-size: 58%"> %SET{ "parentlist" value="%META{ "parent" nowebhome="on" format="$topic" separator=", " }%" }%%SET{ "parent" value="%CALCULATE{$LISTITEM(-1, %GET{parentlist}%)}%" }%%CALCULATE{$LISTJOIN($sp»$sp, $LISTMAP([[$item][$PROPERSPACE($item)]], %GET{parentlist}%))}% » </span> + * Set PARENTBC = <span style="font-size: 58%"> %SET{ "parentlist" value="%META{ "parent" nowebhome="on" format="$topic" separator=", " }%" }%%SET{ "parent" value="%CALCULATE{$LISTITEM(-1, %GET{parentlist}%)}%" }%%CALCULATE{$LISTJOIN($sp»$sp, $LISTMAP([[$item][$PROPERSPACE($item)]], %GET{parentlist}%)) $IF($LENGTH(%GET{parentlist}%)>0, »)}% </span> * [[VarREG][Registered trademark symbol]]: * Set REG = ® |