Difference between revisions of "Editing"
From Critiques Of Libertarianism
Line 5: | Line 5: | ||
A major objective is creating indexes by using DPL to display links to and descriptions of pages that are in some category. This is done with [[Template:List Category]]. It creates a definition list with the page title as the term to be defined, and the definition information is fetched with the metadata template [[Template:DES]]. The defined term is linked to the wiki page or (if the page has a metadata template [[Template:URL]]) to an external page. This indexing system deliberately does no transclusion with DPL: all the information extracted comes from the page title and the metadata templates. | A major objective is creating indexes by using DPL to display links to and descriptions of pages that are in some category. This is done with [[Template:List Category]]. It creates a definition list with the page title as the term to be defined, and the definition information is fetched with the metadata template [[Template:DES]]. The defined term is linked to the wiki page or (if the page has a metadata template [[Template:URL]]) to an external page. This indexing system deliberately does no transclusion with DPL: all the information extracted comes from the page title and the metadata templates. | ||
− | + | Pages indexing categories that resemble Category pages are easily constructed using [[Template:List Category]] like this: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<pre> | <pre> | ||
− | + | {{List Category | cat = Some Category Name}} | |
− | + | ||
− | {{ | + | |
− | + | ||
</pre> | </pre> | ||
− | + | Here is an example wiki page that could be listed by the above: | |
<pre> | <pre> | ||
− | [[Category: | + | <noinclude>[[Category:Some Category Name]][[Category:Another]]{{DES | des = Short description to be transcluded.}}</noinclude> |
− | [[Category:Another]] | + | |
{{URL | url = the URL of the resource}} | {{URL | url = the URL of the resource}} | ||
− | + | Text on the page. | |
− | Text | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
− | + | The above example is in the two categories explicitly listed, and [[Category:Description]] from the transcluded [[Template:DES]]. The presence of the [[Template:URL]] makes this list with an external link, but a link to the wiki page ([more...]) is appended after the description. If the [[Template:URL]] is not there, the link is to the wiki page only. The <nowiki><noinclude></nowiki> is not necessary unless this page is going to be transcluded elsewhere (since [[Template:List Category]] does not transclude.) | |
− | It's easiest to create a new | + | It's easiest to create a new page by copying from another, similar one. |