Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.