CD2HTML Title
[Index]
What is CD2HTML | Features | Tech. Support | New program versions | Disclaimer | Registering |
Installation / Deinstallation | How CD2HTML works | Using CD2HTML | Shortcuts | Command-line functions | Tips and Tricks |
Creating HTML templates | CD2HTMLs own tags |
The Team | Version history |

CD2HTMLs own tags

It doesn't matter if you write the tags in capital or small letters. But don't forget the '<%' and '%>' at the begin and end of a tag. If you make mistakes CD2HTML will show you a message in the HTML output.

File info

<%date%>
<%description%>
<%dirname%>
<%dirsize%>
<%dltime14.4k%>,
<%dltime28.8k%>,
<%dltime64k%>
<%dltime56k%>
<%dltime2m%>

<%filepath%>
<%is_dir display_text%>
<%is_file display_text%>
<%name%>
<%onliner%>
<%size%>
<%totalsize%>

Index

<%anchor%>
<%index%>
<%indexbr%>
<%indexli%>
<%prevnextlist%>
<%prevnextsimple%>

Links

<%dpiclink%>
<%link%>
<%links%>
<%picturelink%>

Loops

<%repeat=x%>
...
<%endrepeat%>

<%oddeven odd="..." even="..."%>

 

Music data (MP3)

<%mp3title%>
<%mp3artist%>
<%mp3album%>
<%mp3year%>
<%mp3comment%>,
<%mp3genre%>

<%mp3original%>
<%mp3copyright%>
<%mp3samplerate%>
<%mp3durationmin%>
<%mp3durationsec%>
<%mp3mode%>
<%mp3layer%>
<%mp3version%>
<%mp3bitrate%>

Other

<%include%>

Page info

<%author%>
<%dircountabs%>
<%dircount%>
<%filecount%>
<%filecountabs%>
<%itemscountabs%>
<%itemscount%>
<%ldate%>
<%linkparent display_text%>
<%ltime%>
<%pages%>
<%parentpath%>
<%path%>
<%root%>
<%thispage%>
<%title%>

Picture data

<%dpiclink%> <%picture%>
<%picturelink%>
<%picxres%>,
<%picyres%>,
<%picdepth%>,
<%pictype%>,
<%piccomment%>

<%picturepath%>

<%anchor%>

The anchor tag creates an anchor for a link in the index (see index tag). It makes no sense to use the anchor tag without the index tag. The output looks like <a name="xxx">, where xxx is a value CD2HTML derives from the number of the entry in the list-view.

Description:an anchor for <%index%>-tag, needs <%index%> if used
Available:HEADLINES
Sample output:<a name="23">

<%author%>

The author tag writes a message with links about CD2HTML and the author. You should always provide the author tag, because I want as many people as possible use my program. If you don't want to use it, leave it out.

Description:a link to the author and his homepage
Available:everywhere
Sample output:CD2HTML (© Falk Petro 1998)

<%date%>

The date tag prints the last modified date of an entry (what else?).

Description:the date of an entry
Available:VALUES
Sample output:31-08-1970

<%description%>

The description tag writes the description CD2HTML has found for an entry. CD2HTML notes the order you have defined in the options dialog (normally the file_id.diz at first ant then the info.txt) and uses the first of the files it found. If no description is found, CD2HTML writes only a &nbsp;. In packed archives CD2HTML is only looking for the file_id.diz. Each line will be finished by a hard line-break (<BR>) because in most cases it looks much better. Maybe I will later add an option to switch this off.

Description:the description for an entry (e.g. found in the file_id.diz)
Available:VALUES, HEADLINES
Sample output:CD2HTML v3.0, written by Falk Petro

<%dircount%>

Returnes the number of subdirectories the current directory contains.

Description:number of subdirectories of the current directory
Available:HEADLINES
Sample output:23

<%dircountabs%>

Returnes the total number of directories.

Description:total number of directories
Available:HEADLINES
Sample output:612

<%dirname%>

The directory-name tag specifies the next upper directory name of an entry which is marked as text. So this tag is only for these entries available or for the directory itself.

Description:the name of the actual directory
Available:HEADLINES, VALUES
Sample output:CD2HTML v3.0

<%dirsize%>

The directory-size tag specifies the size of the parent directory of an entry which is marked as text. So this tag is only for these entries available or for the directory itself. The value is rounded (if the size is greater than 1048576 bytes the value is rounded to MB, if the size is between 1024 and 1048576 bytes value is rounded to KB and in all other cases the value isn't rounded and written in bytes).

Description:the total-size of a directory
Available:HEADLINES, VALUES
Sample output:240KB

<%dltime14.4k%>, <%dltime28.8k%>, <%dltime64k%>, <%dltime56k%>
<%dltime2m%>

On Internet servers it is very useful to show the time which is used for the download of the current file. I found the idea on the www.windows95.com server. The values can be seen as the minimal download-time for modems with 14400 bps and 28800 bps or ISDN adapters with 64000 bps (bps = bits per second). The tags are calculated with the file-size and 1750 bytes/s, 3500 bytes/s and 8000 bytes/s. I don't know if I should use other values to make the results more realistic (because this results are more idealistic). These tags only make sense in the file-mode, but they can be also used for a directory.

Description:the download time for a file or directory
Available:HEADLINES, VALUES
Sample output:2:16

<%dpiclink%>

Links picture entries direct into the HTML file. This is useful, if you want to make an index for small gif animations.

Description:links picture entries direct into the HTML file
Available:HEADLINES, VALUES
Sample output:<img src="pictures/img412.gif">

<%filecount%>

Returnes the number of files the current directory contains.

Description:number of files of the current directory
Available:HEADLINES
Sample output:23

<%filecountabs%>

Returnes the total number of files.

Description:total number of files
Available:HEADLINES
Sample output:612

<%filepath%>

Returnes the path of the current file relative to the current HTML document. With this tag you can design your ows links (e.g. <a href="<%filepath%>" target="_top"><%name%></a>).

Description:path of the current file
Available:HEADLINES, VALUES
Sample output:../zip/cd2html.zip

<%include%>

The <%include%> tag reads a file and writes it in the HTML file the usage is <%include file%> where file is a file in the dir where the HTML files are saved in or an absolute path (e.g. <%INCLUDE d:\html\header.html%>, <%INCLUDE header.html%>). The included file will also be parsed for CD2HTMLs own tags.

Description:includes a file in the current HTML file
Available:everywhere
Sample output:file-content

<%index%>

This tag does what it says: it creates an index of all entries which are marked as directory. So you can insert links to all headlines or tables if you want. But it only makes sense if you use the index tag together with the anchor tag. So see the anchor tag too.

Description:link-section to the tables (like an index), needs <%anchor%> if used
Available:everywhere (recommended: HEAD, FOOTER)
Sample output:<a href="#23">Tools</a> <a href="#31">Internet</a> ...

<%indexli%>

<%indexli%> tag is nearly the same as the <%index%> tag, but it writes a <LI> after each link. So you can use it together with the <OL> or <UL> tag (e.g. <UL> <%indexli%> </UL> creates an index with a dot before each indexlink). See also <%index%> and <%indexbr%> tag

Description:link-section to the tables (like an index) with a <LI> tag after each link, needs <%anchor%> if used
Available:everywhere (recommended: HEAD, FOOTER)
Sample output:<a href="#23">Tools</a> <a href="#31">Internet</a><LI> ...

<%indexbr%>

<%indexli%> tag is nearly the same as the <%index%> tag, but it writes a <BR> after each link. So you have a more cheerful outfit. See also <%index%> and <%indexlt%> tag

Description:link-section to the tables (like an index) with a <BR> tag after each link, needs <%anchor%> if used
Available:everywhere (recommended: HEAD, FOOTER)
Sample output:<a href="#23">Tools</a> <a href="#31">Internet</a><BR> ...

<%is_dir display_text%>

Returns display_text if the current item is a directory. By using this tag you are for instance able to format text for directories different than for files (e.g. <%is_dir &lt;DIR&gt;%> displays <DIR>if the current item is an directory).

Description:Returns display_text for directories
Available:VALUES
Sample output:<DIR>

<%is_file display_text%>

Is the contra to <%is_dir display_text%>.

Description:Returns display_text for files
Available:VALUES
Sample output:<Datei>

<%itemscountabs%>

Returns the total number of files and directories and is the sum of <%dircountabs%> and <%filecountabs%>.

Description:total number of files and directories
Available:HEADLINES
Sample output:612

<%itemscount%>

Returns the number of files and subdirectories of the current directory and is the sum of <%dircount%> and <%filecount%>.

Description:number of files and subdirectories of the current directory
Available:HEADLINES
Sample output:62

<%ldate%>

The ldate tag gets the local date from the internal clock of your computer. You can use this tag to show the date of the last changes of the index file.

Description:the actual date
Available:everywhere
Sample output:31-08-1997

<%linkparent display_text%>

Tag for linking back to the parent HTML file <%linkparent display_text%>. If you have multiple html files created (mode 3), this tag helps you to link back from one HTML file to the parent HTML file. Alternatively you can get the path only by using the <%parentpath%> tag.

Description:a link to the parent document (mode 3, multiple pages)
Available:everywhere
Sample output:<a href="index.html">[upper dir]</a>

<%ltime%>

The ltime tag gets the local time from the internal clock of your computer. You can use this tag to show the time of the last changes of the index file.

Description:the actual time
Available:everywhere
Sample output:19:54

<%link%>

The link tag creates a link to the current file/directory. The link text which is shown in the html browser is the file- or directory name. If you save the html file on the same drive the index is created from CD2HTML creates relative links. It means that the links doesn't use a drive letter. This is absolutely necessary if you generate the index for an Internet/Intranet server. In all other cases CD2HTML creates absolute links which including a drive letter and the full path (because there is no other way).

Description:a link to the actual entry
Available:VALUES, HEADLINES
Sample output:<a href="../tools/cd2html.zip">cd2html.zip</a>

<%links%>

The links tag creates links to all the files CD2HTML has found for the actual directory. What CD2HTML should link is specified in the options dialog (by extension). You can edit the files which should be linked before writing the html file. If you double click in the list view in CD2HTML's main-window and in the window which opens, you go 'links'. See the comments I made about absolute and relative links in the description of <%link%> tag.

Description:the specified link(s) for an entry (by extension)
Available:VALUES
Sample output:<a href="../tools/cd2html.zip">cd2html.zip</a>, <a href="../tools/cd2html.zip">cd2html_src.zip</a>

<%mp3title%>, <%mp3artist%>, <%mp3album%>, <%mp3year%>, <%mp3comment%>, <%mp3genre%> tags:

These tags provides you with all the information of the ID3 tag of MPEG Layer 3 files. You can get these information only if your MP3 files including the ID3 tag. You can also edit this information if you double-click on an MP3 file in the CD2HTML list view.

Description:ID3 tag information
Available:VALUES
Sample output:Dancing Queen/ABBA/Gold/1992/FrontNet Audio Group/Classic

<%mp3original%>, <%mp3copyright%>, <%mp3samplerate%>, <%mp3durationmin%>, <%mp3durationsec%>, <%mp3mode%>, <%mp3layer%>, <%mp3version%>, <%mp3bitrate%>

These tags gives you the full support for MP3 files information. These tags corresponds to MP3 information like song duration (min, sec), encoding, bitrate, original flag (yes|no), copyright (yes|no), layer ('Unknown', 'I', 'II', 'III'), mode (Stereo, Joint-Stereo, Dual-channel, Single-Channel) and version ('Unknown', '1.0', '2.0', '2.5').

Description:MP3 file information
Available:VALUES
Sample output:128bps MPEG 1.0 Layer II Stereo, 44100 Hz, Original: yes, Copyright: no

<%name%>

The name tag contains the name of the current file/directory.

Description:the name of an entry
Available:VALUES
Sample output:CD2HTML.ZIP

<%oddeven odd="..." even="..."%>

This is used to switch between the text in quotes after odd/even for odd/even entries (e.g. in table cells). Use this to change e.g. the background color for table cells containing the file entries (e.g. <tr bgcolor="<%oddeven odd="#ffddaa" even="#f0f0f0"%>">).

Description:differentiate between odd/even rows
Available:VALUES
Sample output:see above

<%onliner%>

This tag is similar to <%description%>-tag but it gives only the first line of a description-file. If there is no description available <%onliner%> tag returns &nbsp;.

Description:the first line of a description
Available:VALUES, HEADLINES
Sample output:CD2HTML 2.0 by Falk Petro

<%pages%>

If CD2HTML is in mode 2 (limited entries per page) this tag returns the total HTML pages CD2HTML will create to store all entries. See also <%thispage%>.

Description:returns the total number of pages (mode 2, limited entries per page)
Available:everywhere
Sample output:4

<%parentpath%>

If you have multiple html files created (mode 3) this tag returns the path of the parent HTML document, so this tag helps you to link back from one HTML file to the parent HTML file. Normaly you should use the <%linkparent display_text%> tag, because it's easier to use but <%parentpath%> is more flexible because you can create your own anchor tag.

Description:path to the parent document (mode 3, multiple pages)
Available:everywhere
Sample output:index.html

<%path%>

The path tag contains the path of the current file/directory relative to the root path (the path you have started the scanning process).

Description:the actual path for an entry
Available:HEADLINES, VALUES
Sample output:/tools/

<%picture [widthxheight]%>

This tag creates a GIF picture of the icon belonging to the current file/directory (the associated windows icon) or a thumbnail of the file (for GIF-, PNG- and JPEG-images) anr returns the HTML code to include the image. The picture will be saved in the thumbnail directory which can be changed in the Options Dialog (e.g. 'pics') relative to the HTML file. If some files/directories have the same icon, the thumbnail will be created only once. The thumbnail prefix is normally 'tn_' but can also be changed in the Options Dialog.

Optional you can give the width and height for the thumbnail to override the defaults from the options dialog (e.g. <%picture [300x400]%>). So you are able to go beyond the limitation of 140x140 pixels from the Options Dialog.

Description:the icon/thumbnail of an entry
Available:HEADLINES, VALUES
Sample output:<img src="pics/tn_img412.gif">

<%picturelink [widthxheight]%>

Is nearly the same as the <%picture%> tag. The only difference is, that this icon is a link to the program/directory that it belongs to. For further information see the description of the <%picture%> tag.

Optionally you can give the width and height for the thumbnail to override the defaults from the options dialog (e.g. <%picture [300x400]%>). So you are able to go beyond the limitation of 140x140 pixels from the Options Dialog.

Description:the icon or thumbnail of an entry with a link to the file it belongs to
Available:HEADLINES, VALUES
Sample output:<a href="../tools/cd2html.zip"><img src="pics/img412.gif" border="0"></a>

<%picturepath%>

Is nearly the same than the <%picture%> tag, but it returns only the path to the thumbnail and not an HTML image tag.

Optionally you can give the width and height for the thumbnail to override the defaults from the options dialog (e.g. <%picture [300x400]%>). So you are able to go beyond the limitation of 140x140 pixels from the Options Dialog.

Description:the icon or thumbnail of an entry
Available:HEADLINES, VALUES
Sample output:pics/img412.gif

<%picxres%>, <%picyres%>, <%picdepth%>, <%pictype%>, <%piccomment%> tags:

These tags giving the named information about pictures.

Description:writing the X-, Y-resolution, colordepth, type (Gif, JPEG, PNG, ...) of an picture and it's comment (from the descript.ion)
Available:VALUES
Sample output:640x480x256 Gif file (picture of my girlfriend)

<%prevnextlist%>

This tag works only in mode 2 (limited entries per page) and returns a link list to all the pages CD2HTML creates. You can modify the design by changing the mode 2 options in the Options Dialog. See also <%prevnextsimple%>

Description:returns a pagenavigation (mode 2, limited entries per page)
Available:everywhere
Sample output: <p>
<a href="index.html"><-- previous</a>
<A HREF="index.html">1</A>|
<A HREF="index_01.html">2</A>|
<A HREF="index_02.html">3</A>|
<a href="index_02.html">next --></a>

<%prevnextsimple%>

This tag works only in mode 2 (limited entries per page) and returns a link to the next and previous page. You can modify the design by changing the mode 2 options in the Options Dialog. See also <%prevnextlist%>

Description:and returns a link to the next and previous page (mode 2, limited entries per page)
Available:everywhere
Sample output: <p>
<a href="index.html"><-- previous</a>
<a href="index_02.html">next --></a>

<%REPEAT=x%> ... <%ENDREPEAT%> tags:

If something should change after all xxx entries, then you need these tags. For example you want to write 5 table columns including some informations about your pictures and then start a new row you have to write:

<TR>
  <%repeat=5%>
  <TD>
    <%picturelink%> <BR>
    <%name%> <BR>
    <%picxres%>x<%picyres%>x<%picdepth%> [<%size%>]
  </TD>
  <%endrepeat%>
</TR>

Description:does something for some entries and then loops back
Available:HEADLINES, VALUES
Sample output:see above

<%root%>

The root tag gives the name of the uppermost directory of the search. It's a good replacement of the title tag.

Description:the root path of the search
Available:everywhere
Sample output:my pictures

<%size%>

The size tag gives the size of the current file/directory. The output is in the same format as <%dirsize%> tag. So see the description of <%dirsize%> tag too.

Description:the size of an entry (depending on the size in bytes, KB, MB)
Available:HEADLINES, VALUES
Sample output:224KB

<%thispage%>

If CD2HTML is in mode 2 (limited entries per page) this tag returns the actual HTML page number. See also <%pages%>.

Description:returns the actual page number (mode 2, limited entries per page)
Available:everywhere
Sample output:1

<%title%>

The title tag gives the title of the document. It's fixed in the options dialog.

Description:the title of the document
Available:everywhere
Sample output:Index of /files/

<%totalsize%>

This tag gives the total size of the search. It's the size of the directory you have started the search from. The output is in the same format as <%dirsize%> tag. So see the description of <%dirsize%> tag too.

Description:total-size of all files (depending on the size in bytes, KB, MB)
Available:everywhere
Sample output:624MB