From bea828a2f6b455c46f2b5d6c16805958a2e3412a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 13:30:52 +0000 Subject: doesn't field+template already cover this? --- doc/plugins/contrib/ftemplate/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/plugins/contrib/ftemplate/discussion.mdwn (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn new file mode 100644 index 000000000..851ccf960 --- /dev/null +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -0,0 +1,6 @@ +Is this actually necessary? Doesn't the combination of [[plugins/template]] +with [[plugins/contrib/field]]'s `pagetemplate` hook provide the same +functionality? I suppose one missing thing is that `ftemplate` looks in +the "system" templates directories, not just in the wiki, but that +seems orthogonal (and might even be a good enhancement to `template`). +--[[smcv]] -- cgit v1.2.3 From fffd7e7e026f61e03b2fa052acdf7130889f6343 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 13:43:37 +0000 Subject: oh, my mistake... this *is* necessary, but could perhaps be done better? --- doc/plugins/contrib/ftemplate/discussion.mdwn | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index 851ccf960..eb2ec6f13 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -1,6 +1,13 @@ -Is this actually necessary? Doesn't the combination of [[plugins/template]] -with [[plugins/contrib/field]]'s `pagetemplate` hook provide the same -functionality? I suppose one missing thing is that `ftemplate` looks in +I initially thought this wasn't actually necessary - the combination +of [[plugins/template]] with [[plugins/contrib/field]]'s `pagetemplate` +hook ought to provide the same functionality. However, `template` +doesn't run `pagetemplate` hooks; a more general version of this +plugin would be to have a variant of `template` that runs `pagetemplate` +hooks (probably easiest to just patch `template` to implement a +second directive, or have a special parameter `run_hooks="yes"`, +or something). + +Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that -seems orthogonal (and might even be a good enhancement to `template`). +seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] -- cgit v1.2.3 From 2d1e4cce45024f6b2c384eaf7b5276c448cb3a05 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 30 Mar 2010 05:38:31 +0000 Subject: response --- doc/plugins/contrib/ftemplate/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index eb2ec6f13..adb66ee6a 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -7,7 +7,11 @@ hooks (probably easiest to just patch `template` to implement a second directive, or have a special parameter `run_hooks="yes"`, or something). +> I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] + +> Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] -- cgit v1.2.3 From 026355cfa24dc911a247dcafca10c6ea74ae515b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 30 Mar 2010 12:09:59 +0000 Subject: respond and attempt to invoke Joey :-) --- doc/plugins/contrib/ftemplate/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index adb66ee6a..de4b35ef0 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -9,9 +9,24 @@ or something). > I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] +>> `Render`, `inline`, `comments` and `recentchanges` run `pagetemplate` +>> hooks, as does anything that uses `IkiWiki::misctemplate`. From that +>> quick survey, it seems as though `template` is the only thing that +>> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? +>> +>> It just seems strange to me that `field` needs to have its own +>> of `template` (this), its own variant of `inline` (`report`), +>> and so on - I'd tend to lean more towards having `field` +>> enhance the existing plugins. I'm not an ikiwiki committer, +>> mind... Joey, your opinion would be appreciated! --[[smcv]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] > Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] + +>> Yeah, that's something that annoys me about `template` too. I've +>> opened a todo: [[todo/user-defined_templates_outside_the_wiki]]. +>> --s -- cgit v1.2.3 From 0503bf7c8824d941b26da4c91b4ee1f721fcf54c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 30 Mar 2010 12:10:40 +0000 Subject: --- doc/plugins/contrib/ftemplate/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index de4b35ef0..6a1d9f685 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -15,7 +15,7 @@ or something). >> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? >> >> It just seems strange to me that `field` needs to have its own ->> of `template` (this), its own variant of `inline` (`report`), +>> variant of `template` (this), its own variant of `inline` (`report`), >> and so on - I'd tend to lean more towards having `field` >> enhance the existing plugins. I'm not an ikiwiki committer, >> mind... Joey, your opinion would be appreciated! --[[smcv]] -- cgit v1.2.3 From fc5445b90677489642e4ae8d5b2f6c54cdd847c5 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 31 Mar 2010 03:01:41 +0000 Subject: response --- doc/plugins/contrib/ftemplate/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index 6a1d9f685..eb84dd09b 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -20,6 +20,8 @@ or something). >> enhance the existing plugins. I'm not an ikiwiki committer, >> mind... Joey, your opinion would be appreciated! --[[smcv]] +>>> I did it that way basically because I needed the functionality ASAP, and I didn't want to step on anyone's toes, so I made them as separate plugins. If Joey wants to integrate the functionality into IkiWiki proper, I would be very happy, but I don't want to put pressure on him. --[[KathrynAndersen]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). -- cgit v1.2.3 From 0dad28b3530d70830456a3f8d57b0e3f3d52ee2d Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sat, 3 Apr 2010 00:45:16 +0000 Subject: reduced difference --- doc/plugins/contrib/ftemplate/discussion.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index eb84dd09b..1e0bca5d8 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -29,6 +29,5 @@ seems orthogonal (and might be a good enhancement to `template` anyway). > Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] ->> Yeah, that's something that annoys me about `template` too. I've ->> opened a todo: [[todo/user-defined_templates_outside_the_wiki]]. ->> --s +>> Joey has added support for +>> [[todo/user-defined_templates_outside_the_wiki]] now. --s -- cgit v1.2.3 From 3fbcd2c8d270b1282e3c457cd2eb7720f43726af Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jun 2010 14:58:39 -0400 Subject: move contrib plugin directives out of ikiwiki/directive Problem is that ikiwiki/directive is turned into an underlay and added to all wikis. And the test suite checks it for broken links and turns some up. So it's not appropriate for contrib plugin's directives to be documented in there. --- doc/ikiwiki/directive/ftemplate.mdwn | 106 --------------- doc/ikiwiki/directive/report.mdwn | 149 --------------------- .../ftemplate/ikiwiki/directive/ftemplate.mdwn | 106 +++++++++++++++ .../contrib/report/ikiwiki/directive/report.mdwn | 149 +++++++++++++++++++++ 4 files changed, 255 insertions(+), 255 deletions(-) delete mode 100644 doc/ikiwiki/directive/ftemplate.mdwn delete mode 100644 doc/ikiwiki/directive/report.mdwn create mode 100644 doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn create mode 100644 doc/plugins/contrib/report/ikiwiki/directive/report.mdwn (limited to 'doc/plugins/contrib/ftemplate') diff --git a/doc/ikiwiki/directive/ftemplate.mdwn b/doc/ikiwiki/directive/ftemplate.mdwn deleted file mode 100644 index 3009fc830..000000000 --- a/doc/ikiwiki/directive/ftemplate.mdwn +++ /dev/null @@ -1,106 +0,0 @@ -The `ftemplate` directive is supplied by the [[!iki plugins/contrib/ftemplate desc=ftemplate]] plugin. - -This is like the [[ikiwiki/directive/template]] directive, with the addition -that one does not have to provide all the values in the call to the template, -because ftemplate can query structured data ("fields") using the -[[plugins/contrib/field]] plugin. - -Templates are files that can be filled out and inserted into pages in -the wiki, by using the ftemplate directive. The directive has an id -parameter that identifies the template to use. - -Additional parameters can be used to fill out the template, in -addition to the "field" values. Passed-in values override the -"field" values. - -There are two places where template files can live. One is in the /templates -directory on the wiki. These templates are wiki pages, and can be edited from -the web like other wiki pages. - -The second place where template files can live is in the global -templates directory (the same place where the page.tmpl template lives). -This is a useful place to put template files if you want to prevent -them being edited from the web, and you don't want to have to make -them work as wiki pages. - -### EXAMPLES - -#### Example 1 - -PageA: - - \[[!meta title="I Am Page A"]] - \[[!meta description="A is for Apple."]] - \[[!meta author="Fred Nurk"]] - \[[!ftemplate id="mytemplate"]] - -Template "mytemplate": - - # - by - - **Summary:** - -This will give: - -

I Am Page A

-

by Fred Nurk

-

Summary: A is for Apple. - -#### Example 2: Overriding values - -PageB: - - \[[!meta title="I Am Page B"]] - \[[!meta description="B is for Banana."]] - \[[!meta author="Fred Nurk"]] - \[[!ftemplate id="mytemplate" title="Bananananananas"]] - -This will give: - -

Bananananananas

-

by Fred Nurk

-

Summary: B is for Banana. - -#### Example 3: Loops - -(this example uses the [[plugins/contrib/ymlfront]] plugin) - -Page C: - - --- - BookAuthor: Georgette Heyer - BookTitle: Black Sheep - BookGenre: - - Historical - - Romance - --- - \[[ftemplate id="footemplate"]] - - I like this book. - -Template "footemplate": - - # - by - - ( - - , - - ) - -This will give: - -

Black Sheep

-

by Georgette Heyer

- -

(Historical, Romance)

- -

I like this book.

- -### LIMITATIONS - -One cannot query the values of fields on pages other than the current -page. If you want to do that, check out the [[plugins/contrib/report]] -plugin. diff --git a/doc/ikiwiki/directive/report.mdwn b/doc/ikiwiki/directive/report.mdwn deleted file mode 100644 index 8f8e6b4e8..000000000 --- a/doc/ikiwiki/directive/report.mdwn +++ /dev/null @@ -1,149 +0,0 @@ -[[!toc]] -The `report` directive is supplied by the [[!iki plugins/contrib/report desc=report]] plugin. - -This enables one to report on the structured data ("field" values) of -multiple pages; the output is formatted via a template. This depends -on the [[plugins/contrib/field]] plugin. - -The pages to report on are selected by a PageSpec given by the "pages" -parameter. The template is given by the "template" parameter. -The template expects the data from a single page; it is applied -to each matching page separately, one after the other. - -Additional parameters can be used to fill out the template, in -addition to the "field" values. Passed-in values override the -"field" values. - -There are two places where template files can live. One is in the -/templates directory on the wiki. These templates are wiki pages, and -can be edited from the web like other wiki pages. - -The second place where template files can live is in the global -templates directory (the same place where the page.tmpl template lives). -This is a useful place to put template files if you want to prevent -them being edited from the web, and you don't want to have to make -them work as wiki pages. - -## OPTIONS - -**template**: The template to use for the report. - -**pages**: A PageSpec to determine the pages to report on. - -**trail**: A page or pages to use as a "trail" page. - -When a trail page is used, the matching pages are limited to (a subset -of) the pages which that page links to; the "pages" pagespec in this -case, rather than selecting pages from the entire wiki, will select -pages from within the set of pages given by the trail page. - -Additional space-separated trail pages can be given in this option. -For example: - - trail="animals/cats animals/dogs" - -This will take the links from both the "animals/cats" page and the -"animals/dogs" page as the set of pages to apply the PageSpec to. - -**sort**: A SortSpec to determine how the matching pages should be sorted. - -**here_only**: Report on the current page only. - -This is useful in combination with "prev_" and "next_" variables to -make a navigation trail. -If the current page doesn't match the pagespec, then no pages will -be reported on. - -### Headers - -An additional option is the "headers" option. This is a space-separated -list of field names which are to be used as headers in the report. This -is a way of getting around one of the limitations of HTML::Template, that -is, not being able to do tests such as -"if this-header is not equal to previous-header". - -Instead, that logic is performed inside the plugin. The template is -given parameters "HEADER1", "HEADER2" and so on, for each header. -If the value of a header field is the same as the previous value, -then HEADER**N** is set to be empty, but if the value of the header -field is new, then HEADER**N** is given that value. - -#### Example - -Suppose you're writing a blog in which you record "moods", and you -want to display your blog posts by mood. - - \[[!report template="mood_summary" - pages="blog/*" - sort="Mood Date title" - headers="Mood"]] - -The "mood_summary" template might be like this: - - - ## - - ### - () \[[]] - - -### Advanced Options - -The following options are used to improve efficiency when dealing -with large numbers of pages; most people probably won't need them. - -**doscan**: - -Whether this report should be called in "scan" mode; if it is, then -the pages which match the pagespec are added to the list of links from -this page. This can be used by *another* report by setting this -page to be a "trail" page in *that* report. -It is not possible to use "trail" and "doscan" at the same time. -By default, "doscan" is false. - -## TEMPLATE PARAMETERS - -The templates are in HTML::Template format, just as [[plugins/template]] and -[[ftemplate]] are. The parameters passed in to the template are as follows: - -### Fields - -The structured data from the current matching page. This includes -"title" and "description" if they are defined. - -### Common values - -Values known for all pages: "page", "destpage". Also "basename" (the -base name of the page). - -### Passed-in values - -Any additional parameters to the report directive are passed to the -template; a parameter will override the matching "field" value. -For example, if you have a "Mood" field, and you pass Mood="bad" to -the report, then that will be the Mood which is given for the whole -report. - -Generally this is useful if one wishes to make a more generic -template and hide or show portions of it depending on what -values are passed in the report directive call. - -For example, one could have a "hide_mood" parameter which would hide -the "Mood" section of your template when it is true, which one could -use when the Mood is one of the headers. - -### Prev_ And Next_ Items - -Any of the above variables can be prefixed with "prev_" or "next_" -and that will give the previous or next value of that variable; that is, -the value from the previous or next page that this report is reporting on. -This is mainly useful for a "here_only" report. - -### Headers - -See the section on Headers. - -### First and Last - -If this is the first page-record in the report, then "first" is true. -If this is the last page-record in the report, then "last" is true. diff --git a/doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn b/doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn new file mode 100644 index 000000000..3009fc830 --- /dev/null +++ b/doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn @@ -0,0 +1,106 @@ +The `ftemplate` directive is supplied by the [[!iki plugins/contrib/ftemplate desc=ftemplate]] plugin. + +This is like the [[ikiwiki/directive/template]] directive, with the addition +that one does not have to provide all the values in the call to the template, +because ftemplate can query structured data ("fields") using the +[[plugins/contrib/field]] plugin. + +Templates are files that can be filled out and inserted into pages in +the wiki, by using the ftemplate directive. The directive has an id +parameter that identifies the template to use. + +Additional parameters can be used to fill out the template, in +addition to the "field" values. Passed-in values override the +"field" values. + +There are two places where template files can live. One is in the /templates +directory on the wiki. These templates are wiki pages, and can be edited from +the web like other wiki pages. + +The second place where template files can live is in the global +templates directory (the same place where the page.tmpl template lives). +This is a useful place to put template files if you want to prevent +them being edited from the web, and you don't want to have to make +them work as wiki pages. + +### EXAMPLES + +#### Example 1 + +PageA: + + \[[!meta title="I Am Page A"]] + \[[!meta description="A is for Apple."]] + \[[!meta author="Fred Nurk"]] + \[[!ftemplate id="mytemplate"]] + +Template "mytemplate": + + # + by + + **Summary:** + +This will give: + +

I Am Page A

+

by Fred Nurk

+

Summary: A is for Apple. + +#### Example 2: Overriding values + +PageB: + + \[[!meta title="I Am Page B"]] + \[[!meta description="B is for Banana."]] + \[[!meta author="Fred Nurk"]] + \[[!ftemplate id="mytemplate" title="Bananananananas"]] + +This will give: + +

Bananananananas

+

by Fred Nurk

+

Summary: B is for Banana. + +#### Example 3: Loops + +(this example uses the [[plugins/contrib/ymlfront]] plugin) + +Page C: + + --- + BookAuthor: Georgette Heyer + BookTitle: Black Sheep + BookGenre: + - Historical + - Romance + --- + \[[ftemplate id="footemplate"]] + + I like this book. + +Template "footemplate": + + # + by + + ( + + , + + ) + +This will give: + +

Black Sheep

+

by Georgette Heyer

+ +

(Historical, Romance)

+ +

I like this book.

+ +### LIMITATIONS + +One cannot query the values of fields on pages other than the current +page. If you want to do that, check out the [[plugins/contrib/report]] +plugin. diff --git a/doc/plugins/contrib/report/ikiwiki/directive/report.mdwn b/doc/plugins/contrib/report/ikiwiki/directive/report.mdwn new file mode 100644 index 000000000..8f8e6b4e8 --- /dev/null +++ b/doc/plugins/contrib/report/ikiwiki/directive/report.mdwn @@ -0,0 +1,149 @@ +[[!toc]] +The `report` directive is supplied by the [[!iki plugins/contrib/report desc=report]] plugin. + +This enables one to report on the structured data ("field" values) of +multiple pages; the output is formatted via a template. This depends +on the [[plugins/contrib/field]] plugin. + +The pages to report on are selected by a PageSpec given by the "pages" +parameter. The template is given by the "template" parameter. +The template expects the data from a single page; it is applied +to each matching page separately, one after the other. + +Additional parameters can be used to fill out the template, in +addition to the "field" values. Passed-in values override the +"field" values. + +There are two places where template files can live. One is in the +/templates directory on the wiki. These templates are wiki pages, and +can be edited from the web like other wiki pages. + +The second place where template files can live is in the global +templates directory (the same place where the page.tmpl template lives). +This is a useful place to put template files if you want to prevent +them being edited from the web, and you don't want to have to make +them work as wiki pages. + +## OPTIONS + +**template**: The template to use for the report. + +**pages**: A PageSpec to determine the pages to report on. + +**trail**: A page or pages to use as a "trail" page. + +When a trail page is used, the matching pages are limited to (a subset +of) the pages which that page links to; the "pages" pagespec in this +case, rather than selecting pages from the entire wiki, will select +pages from within the set of pages given by the trail page. + +Additional space-separated trail pages can be given in this option. +For example: + + trail="animals/cats animals/dogs" + +This will take the links from both the "animals/cats" page and the +"animals/dogs" page as the set of pages to apply the PageSpec to. + +**sort**: A SortSpec to determine how the matching pages should be sorted. + +**here_only**: Report on the current page only. + +This is useful in combination with "prev_" and "next_" variables to +make a navigation trail. +If the current page doesn't match the pagespec, then no pages will +be reported on. + +### Headers + +An additional option is the "headers" option. This is a space-separated +list of field names which are to be used as headers in the report. This +is a way of getting around one of the limitations of HTML::Template, that +is, not being able to do tests such as +"if this-header is not equal to previous-header". + +Instead, that logic is performed inside the plugin. The template is +given parameters "HEADER1", "HEADER2" and so on, for each header. +If the value of a header field is the same as the previous value, +then HEADER**N** is set to be empty, but if the value of the header +field is new, then HEADER**N** is given that value. + +#### Example + +Suppose you're writing a blog in which you record "moods", and you +want to display your blog posts by mood. + + \[[!report template="mood_summary" + pages="blog/*" + sort="Mood Date title" + headers="Mood"]] + +The "mood_summary" template might be like this: + + + ## + + ### + () \[[]] + + +### Advanced Options + +The following options are used to improve efficiency when dealing +with large numbers of pages; most people probably won't need them. + +**doscan**: + +Whether this report should be called in "scan" mode; if it is, then +the pages which match the pagespec are added to the list of links from +this page. This can be used by *another* report by setting this +page to be a "trail" page in *that* report. +It is not possible to use "trail" and "doscan" at the same time. +By default, "doscan" is false. + +## TEMPLATE PARAMETERS + +The templates are in HTML::Template format, just as [[plugins/template]] and +[[ftemplate]] are. The parameters passed in to the template are as follows: + +### Fields + +The structured data from the current matching page. This includes +"title" and "description" if they are defined. + +### Common values + +Values known for all pages: "page", "destpage". Also "basename" (the +base name of the page). + +### Passed-in values + +Any additional parameters to the report directive are passed to the +template; a parameter will override the matching "field" value. +For example, if you have a "Mood" field, and you pass Mood="bad" to +the report, then that will be the Mood which is given for the whole +report. + +Generally this is useful if one wishes to make a more generic +template and hide or show portions of it depending on what +values are passed in the report directive call. + +For example, one could have a "hide_mood" parameter which would hide +the "Mood" section of your template when it is true, which one could +use when the Mood is one of the headers. + +### Prev_ And Next_ Items + +Any of the above variables can be prefixed with "prev_" or "next_" +and that will give the previous or next value of that variable; that is, +the value from the previous or next page that this report is reporting on. +This is mainly useful for a "here_only" report. + +### Headers + +See the section on Headers. + +### First and Last + +If this is the first page-record in the report, then "first" is true. +If this is the last page-record in the report, then "last" is true. -- cgit v1.2.3