Dplchapter: Difference between revisions
Content deleted Content added
m Alianin moved page DPL:Dplchapter to Extension:DPL3/Dplchapter without leaving a redirect: Changing namespaces. |
No edit summary |
||
Line 1: | Line 1: | ||
{{DPL |
{{DPL manual|section=dplchapter}} |
||
⚫ | |||
⚫ | |||
<pre><nowiki> |
<pre><nowiki> |
||
{{#dplchapter: text | heading | limit | page | linktext }} |
{{#dplchapter: text | heading | limit | page | linktext }} |
||
</nowiki></pre> |
</nowiki></pre> |
||
== |
==Effect== |
||
This function is a side entry into DPL's [[include]] function. |
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. |
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=== |
||
<pre><nowiki> |
<pre><nowiki> |
||
{{#dplchapter: |
{{#dplchapter: |
||
Line 35: | Line 32: | ||
--> |
--> |
||
=== |
===Example 2=== |
||
<pre><nowiki> |
<pre><nowiki> |
||
{{#dplchapter: |
{{#dplchapter: |
||
Line 56: | Line 52: | ||
|My Headline|15|Some Page|.. read more}} |
|My Headline|15|Some Page|.. read more}} |
||
--> |
--> |
||
[[Category:DPL Manual]] |
Revision as of 10:11, 12 July 2019
|
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}}
Example 2
{{#dplchapter: Some text. ==== My Headline ==== the body of the desired chapter. ==== Another Chapter ==== Its text. |My Headline|15|Some Page|read more ..}}