Difference between revisions of "Template:Paragraph in chapter"
From Venlo Samenwerkingswijzer
(Created page with "<noinclude> This is the "Paragraph in chapter" template. It should be called in the following format: <pre> {{Paragraph in chapter |Name paragraph= |Chapter={{#var:Chapter}} |...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
</pre> | </pre> | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
− | </noinclude><includeonly>{{#ifeq: {{#var:Content only|No}} | Yes| | + | |
− | {{#vardefineecho:Introductory text|{{#show: {{#var:Paragraph}} | ?Introductory text }}}}{{#ifeq: {{#var:Content only|No}} | Yes| | | + | <!---- |
− | {{#if: {{#var: Introductory text}}|<br>}}'''{{#formredlink:form=Paragraph|link text=Continue reading|existing page link text=Continue reading |link type=link|Paragraph[Title]={{{Name paragraph|}}}|target={{#var:Paragraph|}} }}''' | + | ow-hoofdstuk-kop |
+ | takes two variables from template:chapter | ||
+ | ---> | ||
+ | |||
+ | </noinclude><includeonly>{{#ifeq: {{#var:Content only|No}} |Yes | ||
+ | | | ||
+ | |{{#vardefine: Paragraph | {{#ifexist: {{#var:Chapter}}/{{Safe title|Title={{{Name paragraph|}}} }} | {{#var:Chapter}}/{{Safe title|Title={{{Name paragraph|}}} }} | {{#var:Chapter}}/{{{Name paragraph|}}} }} | ||
+ | }}<!--- | ||
+ | |||
+ | set paragraph | ||
+ | |||
+ | ---->{{#set: | ||
+ | |Paragraph={{#var:Paragraph}} | ||
+ | }}<!---- | ||
+ | |||
+ | vardefine automatic order numbering: | ||
+ | |||
+ | ---->{{#vardefine: Ordernumber|{{#expr: {{#var:Ordernumber}} + 1}} }}<!--- | ||
+ | |||
+ | ----><h2 class="ow-hoofdstuk-kop">{{#formredlink:form=Paragraph|link text={{#var:Ordernumber}}. {{{Name paragraph|}}}|existing page link text={{#var:Ordernumber}}. {{#show: {{#var:Paragraph}} |?Display title of}} |link type=link|Paragraph[Title]={{{Name paragraph|}}}|target={{#var:Paragraph|}} }} </h2><!--- | ||
+ | |||
+ | subobject | ||
+ | |||
+ | --->{{#subobject: | ||
+ | |Item ordened in={{PAGENAME}} | ||
+ | |Ordernumber={{#var:Ordernumber}} | ||
+ | |Item={{#var:Paragraph}} | ||
+ | |Item title={{{Name paragraph|}}} | ||
+ | }}}}<!--- | ||
+ | |||
+ | Introductory text | ||
+ | |||
+ | ---->{{#vardefineecho:Introductory text|{{#show: {{#var:Paragraph}} | ?Introductory text }}}}<!--- | ||
+ | ---->{{#ifeq: {{#var:Content only|No}} | Yes| | {{#if: {{#var: Introductory text}}|<br>}}<!-- | ||
+ | --->'''{{#formredlink:form=Paragraph|link text=Continue reading|existing page link text=Continue reading |link type=link|Paragraph[Title]={{{Name paragraph|}}}|target={{#var:Paragraph|}} }}''' | ||
<br>}}</includeonly> | <br>}}</includeonly> |
Latest revision as of 17:09, 31 October 2016
This is the "Paragraph in chapter" template. It should be called in the following format:
{{Paragraph in chapter |Name paragraph= |Chapter={{#var:Chapter}} |Ordernumber until now={{#var:Ordernumber}} }}
Edit the page to see the template text.