Difference between revisions of "Template:Chapter navigation"

From Venlo Samenwerkingswijzer
Line 10: Line 10:
 
# Setting values
 
# Setting values
  
 +
--->{{#vardefine:@topic|{{BASEPAGENAME}} }}<!---
 
--->{{#vardefine:@section|{{#ask:[[Item::{{PAGENAME}}]] [[Belongs to section::+]]|?Belongs to section=|link=none|mainlabel=-|headers=plain|limit=1}} }}<!---
 
--->{{#vardefine:@section|{{#ask:[[Item::{{PAGENAME}}]] [[Belongs to section::+]]|?Belongs to section=|link=none|mainlabel=-|headers=plain|limit=1}} }}<!---
 +
--->{{#vardefine:@section is topic|{{#ifeq:{{#var:@section}}|{{#var:@topic}}|yes|no}} }}<!---
  
 
# Body
 
# Body
  
---><div class="panel panel-default" style="background-color: #f6f6f6; padding: 1.5em;">
+
---><div class="panel panel-default" style="background-color: #f6f6f6; padding: 1.5em;">{{#switch:{{#var:@section is topic}}
<h4>{{#ifeq:{{#var:@section}}|{{BASEPAGENAME}}|[[{{#var:@section}}]]|[[{{BASEPAGENAME}}#{{#var:@section}}]]}}</h4>
+
|yes=<h4>[[{{#var:@topic}}#{{SUBPAGENAME}}]]</h4>
 +
|no=<h4>[[{{#var:@topic}}]]</h4>
 +
<h5 style="padding-left: .5em">[[{{#var:@topic}}#{{#var:@section}}|{{#var:@section}}]]</h5>
 +
|Geen status gevonden
 +
}}
 
<div class="row">
 
<div class="row">
 
<div class="col-md-12">
 
<div class="col-md-12">
{{#ask: [[Item ordened in::{{BASEPAGENAME}}]] [[Belongs to section::{{#var:@section}}]]
+
{{#ask: [[Item ordened in::{{#var:topic}}]] [[Belongs to section::{{#var:@section}}]]
 
|?Item
 
|?Item
 
|?Item ordened in
 
|?Item ordened in

Revision as of 17:24, 3 November 2016

This is the "Chapter navigation" template. It should be called in the following format:

{{Chapter navigation}}

Edit the page to see the template text.