Dplchapter: Difference between revisions

Embed now moved/testable examples
imported>FrozenPlum
(Remove notice template as it is working now)
imported>FrozenPlum
(Embed now moved/testable examples)
Line 6:
</nowiki></pre>
 
==Effect==
This function is a side entry into DPL's {{DPL3|include}} function.
 
You pass anAn arbitrary text is passed to this function, and youreturned will get backis the body of a chapter within this text, which has 'heading' as a headline. YouThe output can delimitbe the outputdelimited to a maximum number of characters. You will get aA link to 'page' is produced if the text is longer than that limit. The link will normally consistconsists of some arrow, but can be changed to whatever youis wantdesired.
 
==='''Example 1===:'''
{{#lsth:Examples/Module: dplchapter (example 1)|Example}}
<pre><nowiki>
{{ViewTest|Examples|Module: dplchapter (example 1)}}
{{#dplchapter:
Some text.
==== My Headline ====
the body of the desired chapter.
==== Another Chapter ====
Its text.
|My Headline}}
</nowiki></pre>
 
'''Result 1:'''<br>
{{#lsth:Examples/Module: dplchapter (example 1)|Result}}
{{#dplchapter:
Some text.
==== My Headline ====
the body of the desired chapter.
==== Another Chapter ====
Its text.
|My Headline}}
 
 
===Example 2===
'''Example 2:'''
<pre><nowiki>
{{#lsth:Examples/Module: dplchapter (example 2)|Example}}
{{#dplchapter:
{{ViewTest|Examples|Module: dplchapter (example 1)}}
Some text.
==== My Headline ====
the body of the desired chapter.
==== Another Chapter ====
Its text.
|My Headline|15|Some Page|read more ..}}
</nowiki></pre>
 
'''Result 3:'''<br>
{{#lsth:Examples/Module: dplchapter (example 2)|Result}}
{{#dplchapter:
Some text.
==== My Headline ====
the body of the desired chapter.
==== Another Chapter ====
Its text.
|My Headline|15|Some Page|.. read more}}
 
[[Category:Other Modules]]
Anonymous user