PmWiki.PageLayout 2.9 KB

123456789
  1. version=pmwiki-0.6.beta15
  2. newline=²
  3. text=The CustomHeadersAndFooters page gives a brief introduction to modifying the display of pages in PmWiki. This page describes the entire layout sequence in greater detail.²²->%note% Note: This page still reflects the structure of the layout used in PmWiki version 0.5, and needs to be updated for PmWiki version 0.6. ²²First it's helpful to review the basic structure of an HTML document. A script creating an HTML document must basically produce the following parts:²² HTTP Headers Content-type:, etc.² document type <!DOCTYPE ...>² header <html><head>² document title <title>...</title>² stylesheets <style>...</style>² other header tags <meta ...>² body </head><body ...>² HTML markup <table>, text, <a>, etc.² end of document </body></html>²²In general, each component of the document that PmWiki produces can be controlled by one or more configuration variables. For example, the variables controlling the display of a wiki page are given by²² HTTP Headers Content-type:, etc. $HTTPHeaders² document type <!DOCTYPE ...> $HTMLDoctypeFmt² header <html><head> "² document title <title>...</title> $HTMLTitleFmt² stylesheets <style>...</style> $HTMLHeaderFmt² other header tags <meta ...> <link ...> "² body </head><body ...> $HTMLBodyFmt² header <table>, text, <a>, etc. $PageHeaderFmt² wiki text " [=PrintText()=] function² footer " $PageFooterFmt² end of document </body></html> $HTMLEndFmt²²As with $PageHeaderFmt and $PageFooterFmt (described in CustomHeadersAndFooters), the other 'Fmt' variables can contain references to files on disk, user-defined functions, and wiki pages. In fact, PmWiki defines the $HTMLStartFmt variable to aggregate the output up to the HTML <body> tag:²² $HTMLStartFmt = array('headers:', &$HTMLDoctypeFmt, &$HTMLTitleFmt,² &$HTMLHeaderFmt, $HTMLBodyFmt);²²Finally, most of the major PmWiki operations (browse, edit, search, etc.) have variables that define the entire page contents. For example, the layout of a page being displayed via the default browse action is specified by²² $HandleBrowseFmt = array(&$HTMLStartFmt, &$PageHeaderFmt, &$PageTitleFmt,² [="function:PrintText"=], &$PageFooterFmt, &$HTMLEndFmt);²²which outputs all of the HTML header components, $PageHeaderFmt, the text of the wiki page itself, $PageFooterFmt, and the end of the html document.²²%trail%<<|PmWiki.DocumentationIndex|>>²²
  4. time=1076999465
  5. host=24.1.44.14
  6. agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
  7. rev=9
  8. author=Pm
  9. name=PmWiki.PageLayout