GuideML - ITEM-LIST Tag

8 Conversations

The <ITEM-LIST> tag allows you to insert drop-down menus of items (each item being a DNA article, a DNA Member, or a website). Choosing a link will jump to that destination, either in the same window or a new one, depending on the setting of the radio button.

This tag does not form part of Approved GuideML.

Syntax and Usage

Optional attributes are shown in italics, and the vertical bar character | denotes a choice, so H2G2|BIO|HREF means one of H2G2, BIO or HREF.

<ITEM-LIST NAME="...unique name...">

<FIRSTITEM>...first item name...</FIRSTITEM>
<ITEM H2G2|BIO|HREF="...article/userid/url...">...text...</ITEM>

<ITEM>...</ITEM>
...

</ITEM-LIST>

This tag inserts a drop-down menu into your article. The tags work as follows:

  • Each <ITEM-LIST> menu in your article must be given a unique name within that article (but you can use the same names in different articles). The ...unique name... argument is that name, and it must not contain spaces. This name is simply used to ensure that the JavaScript generated by the tag works properly; it doesn't have any other relevance.

  • The optional <FIRSTITEM> tag can be used to define what is displayed in the menu before a choice is made; the ...first item name... argument is what is shown. The default used if there is no <FIRSTITEM> tag is Please choose one.

  • Each <ITEM> tag represents an item in the menu. <ITEM> tags use the same attributes as the <LINK> tag - H2G2, BIO or HREF - to determine the destination for each item in the menu. The ...text... part is what is displayed in the menu.

  • You should put in an <ITEM> tag for each item you want to appear in the menu, and they are displayed in the menu in the order in which they appear within the <ITEM-LIST> block.

Known Issues

None.

Example One

Here's a menu with a <FIRSTITEM> tag and five <BIO> arguments to the <ITEM> tag:

Please choose a Guide EditorDmitri GheorgheniGnomonIcy NorthLanzababySolnushka
<ITEM-LIST NAME="dropdown1">
<FIRSTITEM>Please choose a Guide Editor</FIRSTITEM> <ITEM BIO="U1590784">Dmitri Gheorgheni</ITEM>
<ITEM BIO="U151503">Gnomon</ITEM>
<ITEM BIO="U225620">Icy North</ITEM>
<ITEM BIO="U10790805">Lanzababy</ITEM>
<ITEM BIO="UU138596">Solnushka</ITEM>
</ITEM-LIST>

Example Two

Here's a menu where you can choose from three items:

FeedbackMore about linksBBCi <ITEM-LIST NAME="dropdown2"> <ITEM H2G2="Feedback">Feedback</ITEM> <ITEM H2G2="A184763">More about links</ITEM> <ITEM HREF="http://www.bbc.co.uk/">BBCi</ITEM> </ITEM-LIST>

Further Information


Bookmark on your Personal Space


Entry

A958557

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more