Dplchapter: Difference between revisions
imported>FrozenPlum Embed now moved/testable examples |
imported>FrozenPlum m Minor fix |
||
Line 23: | Line 23: | ||
{{ViewTest|Examples|Module: dplchapter (example 1)}} |
{{ViewTest|Examples|Module: dplchapter (example 1)}} |
||
'''Result |
'''Result 2:''' |
||
{{#lsth:Examples/Module: dplchapter (example 2)|Result}} |
{{#lsth:Examples/Module: dplchapter (example 2)|Result}} |
||
Latest revision as of 03:31, 21 April 2023
|
Manual | dplchapter |
Syntax
{{#dplchapter: text | heading | limit | page | linktext }}
This function is a side entry into DPL's {{#vardefine:page_}}{{#vardefine:page| Controlling output volume}}[[{{#var:page}}|include]] function.
An arbitrary text is passed to this function, and returned is the body of a chapter within this text, which has 'heading' as a headline. The output can be delimited to a maximum number of characters. A link to 'page' is produced if the text is longer than that limit. The link normally consists of some arrow, but can be changed to whatever is desired.
Example 1: {{#lsth:Examples/Module: dplchapter (example 1)|Example}}
Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
Result 1: {{#lsth:Examples/Module: dplchapter (example 1)|Result}}
Example 2
Example 2: {{#lsth:Examples/Module: dplchapter (example 2)|Example}}
Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
Result 2: {{#lsth:Examples/Module: dplchapter (example 2)|Result}}