Edgewall Software

Changes between Version 200 and Version 201 of MacroBazaar


Ignore:
Timestamp:
Apr 21, 2007, 7:56:26 AM (17 years ago)
Author:
kevin@…
Comment:

Added blurb with examples for the ParentLinkage macro

Legend:

Unmodified
Added
Removed
Modified
  • MacroBazaar

    v200 v201  
    230230[[BR]]''Version:'' >= 0.8
    231231[[BR]]''By:'' Muness Alrubaie <muness@gmail.com>
     232
     233=== !ParentLinkage ===
     234
     235Inserts a sort of "breadcrumb" set of links to the parent, grand-parent and so-forth wiki entries. This macro is inspired and sorta based on the !ParentWiki macro. This applies to wiki pages that have a "/" in their name indiciating the heirarchy.
     236
     237There is one argument allowed and this is a simple string of equal signs in the spirit of the wiki header formatting. The string must contain one or more equal signs and no other characters. The argument will trigger the macro to wrap the entire linkage in the appropriate HTML heading tags (with id attribute set).
     238
     239Something interesting to note is that if the content of the href's are !CamelCased words; the macro will somewhat intelligently break them up with spaces. This feature will also take the words "And" and "Of" and replace them with "and" and "of" respectively resulting in "ThisAndThat" being converted into "This and That".
     240
     241''Download:'' [attachment:ParentLinkage.py]
     242[[BR]]''Version:'' >= 0.10
     243[[BR]]''By:'' Kevin C. Krinke <kevin@krinke.ca>
     244
     245==== !ParentLinkage Example A: ====
     246
     247If the current page was named "!GrandParent/!Parent/!ACamelCaseName" and you insert:
     248{{{
     249[[ParentLinkage]]
     250}}}
     251
     252Results in the following HTML output:
     253{{{
     254<a class="wiki" href="/wiki/GrandParent">Grand Parent</a>&nbsp;-&nbsp;<a class="wiki" href="/wiki/GrandParent/Parent">Parent</a>&nbsp;-&nbsp;A Camel Case Name
     255}}}
     256
     257Which renders to something like:
     258{{{
     259Grand Parent - Parent - A Camel Case Name
     260}}}
     261
     262==== !ParentLinkage Example B: ====
     263
     264If the current page was named "!GrandParent/!Parent/!ACamelCaseName" and you insert:
     265{{{
     266[[ParentLinkage(==)]]
     267}}}
     268
     269Results in the following HTML output:
     270{{{
     271<h2 id="GrandParent-Parent-ACamelCaseName"><a class="wiki" href="/wiki/GrandParent">Grand Parent</a>&nbsp;-&nbsp;<a class="wiki" href="/wiki/GrandParent/Parent">Parent</a>&nbsp;-&nbsp;A Camel Case Name</h2>
     272}}}
     273
     274Which renders to something like:
     275{{{
     276== Grand Parent - Parent - A Camel Case Name ==
     277}}}
    232278
    233279=== !RelLink ===