Dplchapter: Difference between revisions
Content deleted Content added
m →Another Chapter: clean up, replaced: [[zh:Extension::{{subst:BASEPAGENAME}}]] → [[zh:扩展:{{subst:BASEPAGENAME}}]] |
uncommenting #dplchapter examples... they were commented out 7 years ago, but no longer cause a crash |
||
Line 22: | Line 22: | ||
</nowiki></pre> |
</nowiki></pre> |
||
<!-- |
|||
{{#dplchapter: |
{{#dplchapter: |
||
Some text. |
Some text. |
||
Line 30: | Line 29: | ||
Its text. |
Its text. |
||
|My Headline}} |
|My Headline}} |
||
--> |
|||
===Example 2=== |
===Example 2=== |
||
Line 43: | Line 41: | ||
</nowiki></pre> |
</nowiki></pre> |
||
<!-- |
|||
{{#dplchapter: |
{{#dplchapter: |
||
Some text. |
Some text. |
||
Line 51: | Line 48: | ||
Its text. |
Its text. |
||
|My Headline|15|Some Page|.. read more}} |
|My Headline|15|Some Page|.. read more}} |
||
--> |
|||
<!-- Extension prefix in other languages: |
<!-- Extension prefix in other languages: |
Revision as of 06:02, 26 September 2021
|
Manual | dplchapter |
Syntax
{{#dplchapter: text | heading | limit | page | linktext }}
Effect
This function is a side entry into DPL's include function.
You pass an arbitrary text to this function and you will get back the body of a chapter within this text which has 'heading' as a headline. You can delimit the output to a maximum number of characters. You will get a link to 'page' if the text is longer than that limit. The link will normally consist of some arrow but can be changed to whatever you want.
Example 1
{{#dplchapter: Some text. ==== My Headline ==== the body of the desired chapter. ==== Another Chapter ==== Its text. |My Headline}}
{{#dplchapter: Some text.
My Headline
the body of the desired chapter.
Another Chapter
Its text. |My Headline}}
Example 2
{{#dplchapter: Some text. ==== My Headline ==== the body of the desired chapter. ==== Another Chapter ==== Its text. |My Headline|15|Some Page|read more ..}}
{{#dplchapter: Some text.
My Headline
the body of the desired chapter.
Another Chapter
Its text.
|My Headline|15|Some Page|.. read more}}