Annotation of wikisrc/templates/filecontent.mdwn, revision 1.2

1.1       wiki        1: <fieldset>
                      2: <legend><TMPL_VAR raw_name></legend>
                      3: <pre>
                      4: <TMPL_VAR raw_text>
                      5: </pre>
1.2     ! wiki        6: </fieldset>
1.1       wiki        7: <TMPL_UNLESS NAME="text">
                      8: 
                      9: ## Description
                     10: 
                     11: Use this template to display the content of a file, while making a clear distinction with the [[programlisting_template|templates/programlisting]].
                     12: 
                     13: Remember that shell commands may be prefixed by:
                     14: 
                     15: * *name* - the name (or path) of the file
                     16: * *text* - text to display as file's content
                     17: 
                     18: ## Examples
                     19: 
                     20: [[!template id=filecontent name="/etc/fstab" text="""
                     21: /dev/wd0a   /     ffs      rw,log   1 1
                     22: /dev/wd0b   none      swap     sw       0 0
                     23: kernfs      /kern     kernfs   rw
                     24: ptyfs       /dev/pts  ptyfs    rw
                     25: procfs      /proc     procfs   rw
                     26: /dev/cd0a   /cdrom    cd9660   ro,noauto
                     27: """]]
                     28: 
                     29: is obtained with:
                     30: 
                     31:     \[[!template id=filecontent name="/etc/fstab" text="""
                     32:     /dev/wd0a   /     ffs      rw,log   1 1
                     33:     /dev/wd0b   none      swap     sw       0 0
                     34:     kernfs      /kern     kernfs   rw
                     35:     ptyfs       /dev/pts  ptyfs    rw
                     36:     procfs      /proc     procfs   rw
                     37:     /dev/cd0a   /cdrom    cd9660   ro,noauto
                     38:     """]]
                     39: </TMPL_UNLESS>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb