Syntax-Programming Синтаксис: контентное программирование
Основные принципы: PmWiki:PageLists | PmWiki:ConditionalMarkup | PmWiki:IncludeOtherPages
(:if auth edit:) ... (:ifend:)
— выводить только для редакторов(:notoc:)
— отключить автоматическую генерацию содержания, класс.notoc
исключает конкретный h* из содержания(:nogroupheader:) | (:nogroupfooter:)
— не выводить общие инклюды группы
Page Text Variables (создаются в контенте страницы):
(:country:Transylvania:)
|:Name: Crisses
|Address: 1313 Mockingbird Lane
— три способа создать Page Text Variable{$:country}
— вызвать ее.
Page Variables (создаются в PHP):
{$FullName}
— обычный вызов;{SomePage$Title}
— вызов переменной с другой страницы;*$PageVariablename}
— вызов переменной из текущей страницы {=$PageVariablename}
— вызов переменной при pagelist, в контексте текущей страницы цикла.
Pagelist-шаблоны сайта :
Список предустановленных шаблонов PmWiki:
fmt=
The "fmt=
" option determines how the resulting list should be displayed.
PmWiki predefines several formats:
fmt=#bygroup
- Display pages within groups (default format)fmt=#simple
- Display a simple ordered list of pages in the form Group.Namefmt=#title
- Display a list of pages by page title. Use "order=title
" to have them sorted by title (default is to order by page name).fmt=#titlespaced
- Display a list of pages by page title, like above, but with spaces between the words in the title.fmt=#group
- Display a list of wikigroups (without listing the pages in the groups)fmt=#include
- Display the contents of each page in the list (note, this could take a very long time for long lists!)fmt=#grouphomes
- An optimized bullet list of group home pages (will work with count=…), requires PmWiki 2.2.103.fmt=#includefaq
- Include just the#faq
sections from pages in the list. (This can also be expensive, especially if the list includes pages that don't have the[[#faq]]
anchor!)fmt=#description
- List pages and append the page's description if it exists. Creates dash by all names, but adding a nested loop to get rid of it causes markup problems (nested loops are not allowed).fmt=#simplename
- Simple bullet list of page names, without the Group name.fmt=#simplenamespaced
- Simple bullet list of spaced page names, without the Group name.fmt=#titlesummary
- A simple bullet list of page title and summary, defined in page by(:Title ttttt:)
and(:Summary:sssss:)
markup.
These formats are defined by page list templates, which can be customized.
This format is not predefined by a page list template:
fmt=count
- Display the number of pages in the list (note the absence of the "#"). In a trail,fmt=count
counts existing and non-existing pages ; to limit count to existing pages, use :if="exists {=$FullName}" fmt=count
(mailing list).