Difference between revisions of "DPL:Manual - dplchapter"

From FollowTheScore
Jump to: navigation, search
(Commented out #dplchapter invocations because they crash with "Fatal error: Class 'DPLInclude' not found in /www/htdocs/w0057617/dpldemo/extensions/DynamicPageList/DPLSetup.php on line 1438")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Type:Manual|section=dplchapter}}
+
{{Type Manual|section=dplchapter}}
  
 
=== Syntax ===
 
=== Syntax ===
Line 13: Line 13:
 
You pass an arbitrary text to this function and you will get back the body of a chapter within this text which has 'heading' as a headline. You can delimit the output to a maximum number of characters. You will get a link to 'page' if the text is longer than that limit. The link will normally consist of some arrow but can be changed to whatever you want.
 
You pass an arbitrary text to this function and you will get back the body of a chapter within this text which has 'heading' as a headline. You can delimit the output to a maximum number of characters. You will get a link to 'page' if the text is longer than that limit. The link will normally consist of some arrow but can be changed to whatever you want.
  
==== Example ====
+
==== Example 1 ====
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 25: Line 25:
 
</nowiki></pre>
 
</nowiki></pre>
  
 +
<!--
 
{{#dplchapter:
 
{{#dplchapter:
 
Some text.
 
Some text.
Line 32: Line 33:
 
Its text.
 
Its text.
 
|My Headline}}
 
|My Headline}}
 +
-->
  
 +
==== Example 2 ====
 +
 +
<pre><nowiki>
 +
{{#dplchapter:
 +
Some text.
 +
==== My Headline ====
 +
the body of the desired chapter.
 +
==== Another Chapter ====
 +
Its text.
 +
|My Headline|15|Some Page|read more ..}}
 +
</nowiki></pre>
 +
 +
<!--
 +
{{#dplchapter:
 +
Some text.
 +
==== My Headline ====
 +
the body of the desired chapter.
 +
==== Another Chapter ====
 +
Its text.
 +
|My Headline|15|Some Page|.. read more}}
 +
-->
  
  
 
[[Category:DPL Manual]]
 
[[Category:DPL Manual]]

Latest revision as of 16:32, 19 July 2013

Manual dplchapter

Syntax

 {{#dplchapter: text | heading | limit | page | linktext }}

Effect

This function is a side entry into DPL's include function.

You pass an arbitrary text to this function and you will get back the body of a chapter within this text which has 'heading' as a headline. You can delimit the output to a maximum number of characters. You will get a link to 'page' if the text is longer than that limit. The link will normally consist of some arrow but can be changed to whatever you want.

Example 1

 {{#dplchapter:
 Some text.
 ==== My Headline ====
 the body of the desired chapter.
 ==== Another Chapter ====
 Its text.
 |My Headline}}


Example 2

 {{#dplchapter:
 Some text.
 ==== My Headline ====
 the body of the desired chapter.
 ==== Another Chapter ====
 Its text.
 |My Headline|15|Some Page|read more ..}}