Local Templates

This page contains local “templates” for PmWiki’s (:pagelist:) directive. The Site.PageListTemplates page contains the standard system templates.

Brief Syntax Explanation:

See also: PageLists, Page Variables, Page Text Variables?, Conditional Markup, and Cookbook:PagelistTemplateSamples.

Use with page variables: = current item < previous item > next item

Conditionals used to structure pagelist output: (:if equal {<$Group}:) At beginning of list (:if equal {>$Group}:) At end of list (:if ! equal {=$Group} {<$Group}:) First item in group (:if ! equal {=$Group} {>$Group}:) Last item in group


fmt=#title

A simple bullet list of page titles.

[[#title]]
(:template defaults order=title:)
* [[{=$FullName}|{=$Title}]]
[[#titleend]]

fmt=#hgroup

Horizontal list of group names, but with each link pointing to the full page.

[[#hgroup]][[{=$FullName}|{=$Group}]] 
[[#hgroupend]]

fmt=#hlangs

Horizontal list of supported languages, as found in Site.Languages

[[#hlangs]]
(:template default trail=Site.Languages:)
[[{{$LangPage}$:Lang{=$Name}}(.{{$LangPage}$:Home{=$Name}})]] 
[[#hlangsend]]

fmt=#haltlangs

Horizontal list of alternate language pages for the current page. Fairly complex processing:

  1. First of all, if the current Group doesn’t define a $:LangGroup in its GroupHeader page, then it returns nothing.
  2. Otherwise, it pulls every entry from that trail that doesn’t reference the current groups language.
  3. Finally, for each entry, it uses a pagelist that searches for the alternate appropriate alternate language page, and either displays it or puts up a “MISSING” message.
[[#haltlangs]]
(:template default trail=Site.Languages if="( ! equal {*$LangGroup} && ! equal {*$LangCode} {=$Name} )":)
(:pagelist fmt=#altlangpage $:LangCode={=$Name} wrap={$$wrap}:)
[[#haltlangsend]]

fmt=#altlangpage

Find and display a pointer to the alternate language page for a given page, or ‘MISSING’;

[[#altlangpage]]
(:template default name=GroupHeader if="( equal {=$:LangGroup} {*$LangGroup} )" :)
(:if ! equal {*$:{=$:LangCode}}:)
[[{=$Group}.{*$:{=$:LangCode}}|{{$LangPage}$:Lang{=$:LangCode}}]] 
(:elseif exists {=$Group}.{*$Name} :)
[[{=$Group}.{*$Name}|{{$LangPage}$:Lang{=$:LangCode}}]] 
(:else:)
'''MISSING:{=$:LangCode}''' 
(:if:)
[[#altlangpage]]

fmt=#langprefix

List of words, prefixed by supported languages, as found in Site.Languages

[[#langprefix]]
(:template default trail=Site.Languages:)
{$$base}
[[#langprefixend]]

fmt=#news

Determine which group to display news for, and then do it.

[[#news]]
(:template default name=GroupHeader $:LangGroup=News if="( equal {=$:LangCode} {*$LangCode} )" :)
(:template each:)
(:pagelist fmt=#newsgroup group={=$Group} count={$$count}:)
[[#end]]


fmt=#newsgroup

Display the news for the given group.

[[#newsgroup]]
(:template defaults order=-$:Date list=content:)
(:template each:)
(:include Site.LocalTemplates#newsitem#end permalink=1 basepage={=$FullName}:)
(:if ! equal "{>$FullName}" ".":)
----
(:if:)
[[#end]]

fmt=#newsitem

Display an individual news item

[[#newsitem]]
(:if ! equal "{$:Date}":)
!!!![-{(ftime "%b %e, %Y" {$:Date} lc="{$:LC}")}-]
(:if [ ! equal "{$:Date}" "" && ! equal "{$:Link}" "" ]:)
!!!![[{$:Link}|'''{$:Title}''']]
(:if [ ! equal "{$:Date}" "" && equal "{$:Link}" "" ]:)
!!!!'''{$:Title}'''
(:if ! equal "{$:Date}":)
{$:Blurb}
(:if [ ! equal "{$:Date}" "" && equal "{$$permalink}" "1" ] :)
||border=0 width=100%
|| [--[[{$FullName}|$[permalink]]]--]||
(:if:)
[[#end]]

What’s New

Aug 12, 2009

The convention is over; thank you for joining us!

Thank you for joining us! Please post links to your convention reports or photos to the Anticipation Livejournal, or let us know on Twitter. And we hope to see a lot of you at Aussiecon 4.

permalink

Aug 9, 2009

Hugo Winners Announced

The 2009 Hugo winners have been announced.

permalink

Aug 7, 2009

Heard about World Science Fiction Conventions (Worldcons) and think they sound cool but not sure they’re worth the money? Then Taster memberships are for you.

permalink