Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Examples/Parameter: secseparators (example 2): Difference between revisions

m
imported>FrozenPlum
(example parcelled out to separate page for transclusion back, and made working)
 
imported>FrozenPlum
 
(2 intermediate revisions by the same user not shown)
Line 6:
==Example==
 
This will list articles in [[:Category:Fruit examples]] using <code>{{DPL|listseparators}}</code> to define a table with three columns, and put a link to the article in the first column of each row. The <code>{{DPL|includepage}}</code> parameter specifies a template used on each page, along with the "grows" parameter value for each row, and the "notes" page section value for pages that have that section name.
 
Assuming that the chapter on "Notes" contains a long text, it can be truncated (e.g., shortened to 40 characters), specifying the text for the truncation after the number to truncate (<code><nowiki>[40 more...]</nowiki></code>. A link which refers directly to those chapters will be generated automatically if needed. Be aware that truncating with <code><nowiki>[ ]</nowiki></code> can break text formatted with wikitext or tags such as <code><nowiki><nowiki></nowiki></code>.
 
<pre>
{{#dpl:
|category = Fruit examples
|listseparators = {¦ class="wikitable" ¶!Fruit ¶!Grows on ¶!Notes,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶¦}
|includepage = {Fruit-Infobox}:grows,#Notes[40 more...]
|secseparators = \n¦
Line 24:
{{#dpl:
|category = Fruit examples
|listseparators = {¦ class="wikitable" ¶!Fruit ¶!Grows on ¶!Notes,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶¦}
|includepage = {Fruit-Infobox}:grows,#Notes[40 more...]
|secseparators = \n¦
|count=5
}}
 
<noinclude>
[[Category:Setting the basic output mode]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.