Examples/Module: dplchapter (example 2)

From DynamicPageList3 Manual
Revision as of 02:53, 21 April 2023 by imported>FrozenPlum (Move example to subpage and better describe it for lsth transclusion)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

This displays the body content of the heading/section matching the heading name ("My Headline") specified, though it limits the output to a maximum length 15 characters (while avoiding breaking words up). The statement also provides a page name to link to, then sets the link text for that page to "read more...".

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

Result

{{#dplchapter: Some text.

My Headline

the body of the desired chapter.

Another Chapter

Its text. |My Headline|15|Some Page|read more...}}