Examples/Module: dplchapter (example 2): Difference between revisions
< Examples
Content added Content deleted
imported>FrozenPlum (Move example to subpage and better describe it for lsth transclusion) |
imported>FrozenPlum m (Couple of fixes) |
||
Line 5: | Line 5: | ||
--> |
--> |
||
==Example== |
==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 |
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 of 15 characters (while avoiding breaking words up). The statement also provides a page name to link to, then sets the link text to "read more..." for that page. |
||
<pre> |
<pre> |
||
{{#dplchapter: |
{{#dplchapter: |
Latest revision as of 02:54, 21 April 2023
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 of 15 characters (while avoiding breaking words up). The statement also provides a page name to link to, then sets the link text to "read more..." for that page.
{{#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...}}