LocalTemplates
This page contains "templates" for PmWiki's (:pagelist:)
directive.
Page list template documentation
- PmWiki.Page Lists - Searching and listing pages by multiple criteria with templated output
- PmWiki.Page List Templates - Creating page list format templates
- PmWiki.Page Variables - variables that are associated with pages
- Page Text Variables - Page variables automatically made available through natural or explicit page markup
- PmWiki.Conditional Markup - Searching and listing pages by multiple criteria with templated output
- Cookbook:Pagelist Template Samples -
#onelinesimple
[[#onelinesimple]](:if ! equal {<$Group} {=$Group}:) \ (:if true:)[[{=$FullName}"{{=$FullName}$:Tags}"|+]], \ [[#onelinesimpleend]]
#oneline
[[#oneline]](:if ! equal {<$Group} {=$Group}:) ''[[{=$Group}/{=$Group}]] '' : %% \ (:if true:)[[{=$FullName}"{{=$FullName}$:Tags}"|+]], \ [[#onelineend]]
INCLUDE
(:template first:)
{{=$FullName}$:TableReel}
(:template each:)
{{=$FullName}$:LigneReel}
Unicité | Pluralité | Liaison | Opération | Composition | Dimension |
---|
(:template each:)
{{=$FullName}$:U} | {{=$FullName}$:P} | {{=$FullName}$:L} | {{=$FullName}$:O} | {{=$FullName}$:C} | {{=$FullName}$:D} |
---|
Matérialité | Activité | Focalité | Spatialité | Temporalité | Existence |
---|
Circulation | Association | Différenciation | Accumulation | Articulation | Virtualité |
---|
(:template each:)
{{=$FullName}$:LigneComposante}
(:template first:)
{{=$FullName}$:TableFacette}
(:template each:)
{{=$FullName}$:LigneFacette}
Maintenir | Ouverture | Réciprocité | Sobriété | Essayer | Semaison |
---|
(:template each:)
{{=$FullName}$:LigneSemaison}
(:template first:)
{{=$FullName}$:TableBoucle}
(:template each:)
{{=$FullName}$:LigneBoucle}
(:template first:)
{{=$FullName}$:TableCoupe}
(:template each:)
{{=$FullName}$:LigneCoupe}
(:template first:)
{{=$FullName}$:TableCercle}
(:template each:)
{{=$FullName}$:LigneCercle}
(:template first:)
{{=$FullName}$:TableRessort}
(:template each:)
{{=$FullName}$:LigneRessort}
fmt=#simplesitemap
fmt=#default
The default template for pagelists when fmt=
isn't specified (and note that on the PmWiki.org wiki, this template is over-ridden by the one on the Site.LocalTemplates page).
(:if false:) [[#default]] (:template first {=$Group}:) :[[{=$Group}/]] /: (:template each:) : :[[{=$Group}/{=$Name}]] [[#defaultend]] (:ifend:) (:pagelist group={$Group} fmt=#default count=6:) |
|
Fmt regroupant les cartes, lignes et colonnes...
#ligne
[[#ligne]] (:include {=$FullName}#ligne#ligneend self=0:) [[#ligneend]]
#lignesimple
[[#lignesimple]] (:include {=$FullName}#lignesimple#lignesimpleend self=0:) [[#lignesimpleend]
#existence
[[#existence]] (:include {=$FullName}#existence#existenceend self=0:) [[#existenceend]]
#Virtualité
[[#Virtualité]] (:include {=$FullName}#Virtualité#Virtualitéend self=0:) [[#Virtualitéend]]
#colonnesimple
[[#colonnesimple]] (:include {=$FullName}#colonnesimple#colonnesimpleend self=0:) [[#colonnesimpleend]]
#colonne
[[#colonne]] (:include {=$FullName}#colonne#colonneend self=0:) [[#colonneend]]
#cartesimple
[[#cartesimple]] (:include {=$FullName}#cartesimple#cartesimpleend self=0:) [[#cartesimpleend]]
#carte
[[#carte]] (:include {=$FullName}#carte#carteend self=0:) [[#carteend]]
pm #menu
[[#menu]] [[{=$FullName}]] [[#menuend]]
#default
[[#default]] (:template first {=$Group}:) :[[{=$Group}/]] /: (:template each:) : :[[{=$Group}/{=$Name}]] [- {=$:Summary} (:if ! equal "{=$:Status}" "":)({=$:Status})(:if:)-] (:template none:) '''$[No results found.]''' [[#defaultend]]
#simpleedit
[[#simpleedit]] * [[{=$FullName}?action=edit]] [[#simpleeditend]] #}
#simplesitemap with Summary
[[#simplesitemap]] (:if equal {<$Group}:) (:table style="border:1px solid #b3b3b3" class=forum width="90%" :) (:cell style="background:#f0f0f0;width:40%;border-bottom:1px solid #b3b3b3;padding-left:5px" :)Topic (:cell style="background:#f0f0f0;border-bottom:1px solid #b3b3b3;padding-left:5px" :)%thd%Summary (:if:) (:cellnr style="background:#fafafa;border-bottom:1px solid #b3b3b3;padding-left:5px" :)[[{=$FullName}|+]] (:cell style="background:#fafafa;border-bottom:1px solid #b3b3b3;padding-left:5px" :){=$:Summary} (:if equal {>$Group}:) (:tableend:)(:if:) [[#simplesitemapend]]
#mapdescription
[[#mapdescription]] (:if equal {<$Group}:) (:table style="border:1px solid #b3b3b3" class=forum width="90%" :) (:cell style="background:#f0f0f0;width:40%;border-bottom:1px solid #b3b3b3;padding-left:5px" :)Topic (:cell style="background:#f0f0f0;border-bottom:1px solid #b3b3b3;padding-left:5px" :)%thd%Description (:if:) (:cellnr style="background:#fafafa;border-bottom:1px solid #b3b3b3;padding-left:5px" :)[[{=$FullName}|+]] (:cell style="background:#fafafa;border-bottom:1px solid #b3b3b3;padding-left:5px" :){=$:Description} (:if equal {>$Group}:) (:tableend:)(:if:) [[#mapdescriptionend]]
Sitemap
[[#sitemap]] (:template first:) !! Sitemap [--((:pagelist fmt=count list=normal:) pages)--] (:template first {=$Group}:) [[#{=$Group}]] !!! [[{=$Groupspaced}/]] [--((:pagelist fmt=count group={=$Group} list=normal:) pages)--] [- {{=$Group}/$:Summary} -] (:template each:) (:if ! equal {=$Name} {$DefaultName} :) -< [[{=$Group}/{=$Namespaced}]] [- {=$:Summary} -] (:ifend:) [[#sitemapend]] ---- (:pagelist group=PmWiki name=-*-Talk fmt=#sitemap list=normal count=16:)
#numbered
([[#numbered]] (:template first {=$Group}:) # [[{=$Groupspaced}]] / (:template each:) ## [[{=$Group}/{=$Namespaced}]] [- {=$:Summary}-] [[#numbered]]
#includefaq
[[#listoffaq]] * [[{=$FullName}#faq | {=$Title}]] [[#listoffaqend]]
#summarylist
List of pages and summary, one per line.
[[#summarylist]] (:template first {=$Group}:) (:template each:) -< [[{=$Group}/{=$Name}]] [-{=$:Summary}-] [[#summarylistend]]
liste
#noteoneline
liste des NoteSemaison de travail
[[#noteoneline]](:if ! equal {<$Group} {=$Group}:) '''[[{=$Group}-Note]], ''' \ (:if true:) [[{=$FullName}|+]], \ [[#noteonelineend]]
(:pagelist fmt=Site/LocalTemplates#noteoneline group=Toposcopie count=4:) |
===
#SideBar
[[#sidebar]](:if equal {<$Group}:) >>fplsidebar<< (:if ! equal {<$Group} {=$Group}:) %sidehead%[[{=$Group}]](:if:) * [[{=$FullName}|+]] (:if equal {>$Group}:) >><<(:if:) [[#sidebarend]]
#sidebartitles
[[#sidebartitles]](:if equal {<$Group}:) >>fplsidebar<<(:if:) * [[{=$FullName}|{=$Titlespaced}]] (:if equal {>$Group}:) >><<(:if:) [[#sidebartitlesend]]
#forum
[[#forum]] (:if equal {<$Group}:) (:table class=forum width="90%" :) (:cell style="background:#e5e5ff;padding-left:5px" :)'''Topic''' (:cell style="background:#e5e5ff;padding-left:5px" :)%thd%'''Last Posted''' (:cell style="background:#e5e5ff;padding-left:5px" :)%thd%'''By''' (:if:) (:cellnr style="background:#eeeeff;padding-left:5px" :)[[{=$FullName}|+]] (:cell style="background:#eeeeff;padding-left:5px" :){=$LastModified} (:cell style="background:#eeeeff;padding-left:5px" :)[[~{=$LastModifiedBy}]] (:if equal {>$Group}:) (:tableend:)(:if:) [[#forumend]]
Using the pagelist option trail=<Group>.RecentChanges:
Setting up a group for RecentChanges:
#teasers
Include the first five lines of every page preceded by an edit link for that page
[[#teasers]] || '''[[{=$FullName}]]''' - [[Edit -> {=$FullName}?action=edit]]|| (:include {=$FullName} lines=4:) (:if ! equal {>$Group}:) ----- (:if:) [[#teasersend]]
fmt=#headerinclude
Include the first paragraph. This allows a more flexible way to get teasers.
[[#headerinclude]] %rfloat%[-more-] [[{=$FullName}|{=$Titlespaced}]] (:include {=$FullName} para=1:) (:if equal {>$Group}:) (:title {$Title}:)(:if:) ---- [[#headerincludeend]]
fmt=#articleteaser
A modification of the 'teasers' template showing how css Eléments can be used.
[[#articleteasers]] [+{=$Title}+] %define=leftborder border-left="2px solid #88f" margin-left="2px" padding="0 0 0 10px"% >>leftborder<<(:include {=$FullName} lines=5:) %right% [-[[{=$FullName}|Read More]]-] (:if ! equal {>$Group}:) >><< (:if:) [[#articleteasersend]]
fmt=#includeTitle
Include whole pages, with titles as links to the pages, separated by a horizontal rule underneath each page's content. An edit link is shown if the user is authorized as editor. The title header for each page also contains an anchor which is the same as the full page name, used for #includeToc below.
[[#includeTitle]] (:if auth edit:) %rfloat%[[{=$FullName}?action=DBOwse|[-view-]]](:if:) !![[#{=$FullName}]][[{=$FullName}|{=$Title}]] (:include {=$FullName}:) ---- (:if equal {>$Group}:) (:title {$Title}:)(:if:) [[#includeTitleend]]
fmt=#includeToc
Build a table of contents for the included pages included by #includeTitle above.
[[#includeToc]] * [[#{=$FullName}|{=$Title}]] [[#includeTocend]]
fmt=#groupsWithListLinks
A bullet list of groups, with a link for listing the pages in that group.
[[#groupsWithListLinks]] (:if ! equal {=$Group} {<$Group}:) * [[{=$Group}]] \ ([[list pages -> {$Name}?action=search&q=group%3D{=$Group}]]) (:ifend:) [[#groupsWithListLinksend]]
fmt=#bygrouptitle
A list with group-names and titles (especially for a customized searchlist)
[[#bygrouptitle]] (:if ! equal {=$Group} {<$Group}:) :[[{=$Group}/]] /: (:if:) : :[[{=$Group}/[[{=$Name} | + ]] [[#bygrouptitleend]]
fmt=#includeXref
This is a generalization of the #includefaq format.
Include a section from a page which has an anchor with the same name as the current page your pagelist is on.
[[#includeXref]] (:include {=$FullName}#{$Name}:) [[#includeXrefend]]
fmt=#excerpts
To include an extract of the page text around the search term, as Google does. This makes use of Cookbook:Excerpts and Cookbook:SearchQueryVariable without using Cookbook:SortByScore. You can make this format default for searches (and not pagelists, where it does nothing) by setting (:searchbox fmt=#excerpts:)
on Site.Search
[[#excerpts]] (:if ! equal {=$Group} {<$Group}:) :'''[[{=$Group}/]]''' /: (:if:) : :[[{=$Group}/{=$Name}]] {=$:Title} {=$:Summary} {=$Description} -->%bgcolor=#DBDBDB border="1px dotted grey"%[-(:excerpts {=$Group}.{=$Name} {$SearchQuery}:)-]%% [[#excerptsend]]
fmt=#categorized
In order to list all pages belonging to a particular category
[[#categorized]] (:template defaults order=title:) (:template first:) !!! {{$$link}$Titlespaced} (:template each:) * [[{=$FullName}|{=$Titlespaced}]] [-({=$LastModified} - {=$LastModifiedSummary})-] [[#categorizedend]]
fmt=#colobrydate
A simple bullet list of page names. Colored red if within last
7 days, blue if within last 30 days, green if older.
[[#colobrydate]] * (:if date {$TodayMinus7}..{$TodayYMD} {=$LastModifiedYMD}:)%red%(:elseif date {$TodayMinus30}..{$TodayYMD} {=$LastModifiedYMD}:)%blue%(:else:)%green%(:ifend:) [[{=$FullName}]] modified: {=$LastModifiedYMD}%% [[#colobrydateend]]
colobrydate requires the following lines in config.php:
$FmtPV['$TodayMinus7'] = '"' . strftime("%Y-%m-%d", $Now-(7*24*60*60)) . '"'; $FmtPV['$TodayMinus30'] = '"' . strftime("%Y-%m-%d", $Now-(30*24*60*60)) . '"'; $FmtPV['$TodayYMD'] = '"' . strftime("%Y-%m-%d", $Now) . '"'; $FmtPV['$LastModifiedYMD'] = 'strftime("%Y-%m-%d", $page["time"])';
The output would look something like this (assuming it was run on 2008-07-13):
- Test.PageB modified: 2008-05-04
- Test.PageC modified: 2008-05-04
- Test.PageConfig modified: 2008-05-10
- Test.PageListAAA modified: 2008-07-13
- Test.PagePass modified: 2008-04-30
- Test.Pagestore2 modified: 2008-06-14
fmt=#sidebarexpandthisgroup
An attempt to display all groups with the current group expand to show all pages. The current group and page should be highlighted. Improvements to this template would be much appreciated.
Rik Blok? November 07, 2009, at 01:52 PM
(:if1 false:) [[#sidebarexpandthisgroup]] (:template first {=$Group}:) (:if2 group {=$Group} :) * %sidehead% [[{=$Group}/]] (:else2:) * [[{=$Group}/]] (:if2end:) (:template each:) (:if2 equal {*$Group} {=$Group}:) (:if3 name {=$FullName} :) ** (:comment Empty item so sidehead isn't applied to full list if this is first item :) ** %sidehead% [[{=$FullName}|{=$Titlespaced}]] (:else3:) ** [[{=$FullName}|{=$Titlespaced}]] (:if3end:) (:if2end:) [[#sidebarexpandthisgroup]] (:if1end:)
>>> For Blog
blogtitles
[[#blogtitles]] (:if equal {<$Group}:) >>blogtitles<<(:if:) * [[{=$Namespaced}]] (:if equal {>$Group}:) >><<(:if:) [[#blogtitlesend]]
include
[[#include]] (:if auth edit:) %rfloat%[[{=$FullName}?action=edit|[-edit-]]](:if:) !!![[{=$FullName}|[+{=$Title}+]]] (:include {=$FullName}:) ---- (:if equal {>$Group}:) (:title {$Title}:)(:if:) [[#includeend]]
headerinclude
[[#headerinclude]] (:include {=$FullName} para=1:) !!!!Full article [[{=$FullName}|[+{=$Title}+]]] ---- (:if equal {>$Group}:) (:title {$Title}:)(:if:) [[#headerincludeend]]
#categoryspaced
fmt=#categoryspaced
[[#categoryspaced]] (:template defaults order=title:) [[{=$FullName}|{=$Name}]] [[#categoryspacedend]]
---
fmt=#DecompositionPage
A simple bullet list of -name.
(:if false:) [[#DecompositionPage]] {*$Group}.{*$Name}-[[{=$Name}]] [[#DecompositionPageEnd]] (:ifend:) (:pagelist group={$Group} fmt=#DecompositionPage count=5:) |
Site.LocalTemplates-Aide
|
fmt=#DecompositionGroupe
A simple bullet list of -name.
(:if false:) [[#DecompositionGroupe]] {*$Group}-[[{=$Name}]].{*$Name} [[#DecompositionGroupeEnd]] (:ifend:) (:pagelist group={$Group} fmt=#DecompositionGroupe count=5:) |
Site-Aide.LocalTemplates
|
Agreger
Page last modified on 13 août 2022 à 09h12 with pmwiki-2.3.20 - 📩 Vos commentaires. Merci -> mailto:toposcopie [snail] gmail [period] com?subject=https://www [period] toposcopie [period] fr/Site [period] LocalTemplates -