Template:Guide to Unix/Clink: Difference between revisions
[unreviewed revision] | [unreviewed revision] |
remove notice of bug (I fixed bug); how it works; discussion |
|||
Line 41: | Line 41: | ||
Discuss this template here. --[[User:Kernigh|Kernigh]] 05:14, 20 November 2005 (UTC) |
Discuss this template here. --[[User:Kernigh|Kernigh]] 05:14, 20 November 2005 (UTC) |
||
[[Category:Guide to UNIX:Templates| |
[[Category:Guide to UNIX:Templates|Clink]] |
Revision as of 16:12, 20 November 2005
How to use
The {{Guide to UNIX:clink}} template generates tables of links to pages about Unix commands. The basic syntax is:
{{Guide to UNIX:clink|command|section| special paramaters}}
All of the paramaters are optional except command and the special paramater s for the synopsis. Specifying a section number is highly recommended even if special paramaters are not set. The command and section paramaters must not contain spaces.
You can easily generate links:
- For *BSD manual pages, set bsds to yes and provide a section number.
- For Linux questions wiki page, set lqwiki to yes.
- For GNU coreutils info page, set coreutils to a certain integer from the URL.
What appears |
What you type |
Template:Guide to UNIX:clink | {{Guide to UNIX:clink|chmod| s=changes file mode}} |
Template:Guide to UNIX:clink | {{Guide to UNIX:clink|chmod|1| bsds=yes | s=changes file mode}} |
Template:Guide to UNIX:clink | {{Guide to UNIX:clink|chmod| lq=yes | s=changes file mode}} |
Template:Guide to UNIX:clink | {{Guide to UNIX:clink|chmod| coreutils=81 | s=changes file mode}} |
Template:Guide to UNIX:clink | {{Guide to UNIX:clink|chmod| bsds=yes| lq=yes| coreutils=81 | s=changes file mode}} |
How it works
The template contains a table made with HTML and CSS. The CSS includes the usual code for templates that float to the right ("float: right; clear: right;"). The border style must be repeated for each cell because I would need style tags or an external stylesheet to create a CSS class.
This template uses the "conditional" hack to hide any table rows that are not in use. Entire rows are hidden on the server side because CSS "empty-cells: hide;" fails to hide rows in Konqueror, though it works in Firefox.
Discussion
Discuss this template here. --Kernigh 05:14, 20 November 2005 (UTC)