| 232 | |
| 233 | === !ParentLinkage === |
| 234 | |
| 235 | Inserts 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 | |
| 237 | There 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 | |
| 239 | Something 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 | |
| 247 | If the current page was named "!GrandParent/!Parent/!ACamelCaseName" and you insert: |
| 248 | {{{ |
| 249 | [[ParentLinkage]] |
| 250 | }}} |
| 251 | |
| 252 | Results in the following HTML output: |
| 253 | {{{ |
| 254 | <a class="wiki" href="/wiki/GrandParent">Grand Parent</a> - <a class="wiki" href="/wiki/GrandParent/Parent">Parent</a> - A Camel Case Name |
| 255 | }}} |
| 256 | |
| 257 | Which renders to something like: |
| 258 | {{{ |
| 259 | Grand Parent - Parent - A Camel Case Name |
| 260 | }}} |
| 261 | |
| 262 | ==== !ParentLinkage Example B: ==== |
| 263 | |
| 264 | If the current page was named "!GrandParent/!Parent/!ACamelCaseName" and you insert: |
| 265 | {{{ |
| 266 | [[ParentLinkage(==)]] |
| 267 | }}} |
| 268 | |
| 269 | Results in the following HTML output: |
| 270 | {{{ |
| 271 | <h2 id="GrandParent-Parent-ACamelCaseName"><a class="wiki" href="/wiki/GrandParent">Grand Parent</a> - <a class="wiki" href="/wiki/GrandParent/Parent">Parent</a> - A Camel Case Name</h2> |
| 272 | }}} |
| 273 | |
| 274 | Which renders to something like: |
| 275 | {{{ |
| 276 | == Grand Parent - Parent - A Camel Case Name == |
| 277 | }}} |