H2G2 - GuideML - LINK tag

1 Conversation


Slight modifications for closed tag.

Addition of ...text... properties

The <LINK> tag lets you create clickable links in your articles.

If you want a link to appear in the 'Article Data' box but don't want to put a link in the body of your article, then you should use the <REFERENCES> tag.

Syntax and Usage for Linking to h2g2 Pages

Optional attributes are shown in italics.

<LINK H2G2="...article..." POPUP="1">...text...</LINK>
<LINK H2G2="...article..." POPUP="1"/>

This version is used to link to articles within DNA (ie all pages except Personal Spaces).

  • The ...article... argument can be of the form A123456, C123456 or F123456, or it can be a named article like GuideML-Clinic or Search (you can find out more about named articles here). Don't include any other characters like / or full-stops, and if you need to include a & character, then type it in as &amp; like this: <LINK H2G2="F123456?thread=123456&amp;latest=1">.

  • If ...article... is of the form A123456, then this tag also puts an article in the 'Referenced Articles' section of the Article Data box, the text of which will be the article's title.

  • If POPUP="1" is present, then the link will open up a new browser window for the linked article.

  • If ...text... is present, then the link will function. Note that ...text... can be any text, smilies, images, even escaped &nbsp; entities, but must be a printable or focusable object for the link to function.

  • If the closed version of the tag is used, then the text shown for the link is the title of the referenced article. This enables you to put in links to articles that might have their titles changed, without having to worry about changing the GuideML that links to them. The title will be visible for the saved article, in preview mode links are not active this way.

Syntax and Usage for Linking to External Websites

Optional attributes are shown in italics.

<LINK HREF="...url..." TITLE="...title..." POPUP="1">...text...</LINK>

This version is used to link to websites outside h2g2.

  • For websites outside h2g2, the ...url... argument must be a well-formed and complete URL, normally starting with http://. The tag will put an entry in the 'Referenced Sites' or 'Related BBC Pages' section of the Article Data box, the text of which will be the ...text... argument if the TITLE attribute is not present, or the ...title... argument if the TITLE attribute is present. If you need to include a & character in your URL, then type it in as &amp; like this: <LINK HREF="http://www.example.com/search.cgi?term=h2g2&amp;case=u">.

  • If the TITLE attribute is present, then the tag will put an entry in the 'Referenced Sites' or 'Related BBC Pages' section of the Article Data box, using ...title... argument as the text for the reference link.

  • If POPUP="1" is present, then the link will open up a new browser window for the linked page or site.

  • There is no closed version of this tag available, as it's not practical to dynamically search for titles of off-site web pages.

Syntax and Usage for Linking to h2g2 Researchers

Optional attributes are shown in italics.

<LINK BIO="...userid..." POPUP="1">...text...</LINK>
<LINK BIO="...userid..." POPUP="1"/>

This version is used to link to Researchers' Personal Spaces.

  • The ...userid... argument is of the form U123456 and contains that Researcher's unique ID number. The tag will put an entry in the 'Referenced Researchers' section of the Article Data box, the text of which will be the Researcher's name.

  • If POPUP="1" is present, then the link will open up a new browser window for the linked Personal Space.

  • If the closed version of the tag is used, then the text shown for the link is the name of the referenced Researcher. This enables you to put in links to Researchers without worrying whether they'll change their names. The title will be visible for the saved article, in preview mode links are not active this way.

Known Issues

No 'Referenced Articles' Link for Named Articles, Forums, Categories or Anchored Articles

Currently linking to named articles, Forums or Categories with links like <LINK H2G2="GuideML-Clinic"> or <LINK H2G2="F123456">, or anchored articles like <LINK H2G2="A123456#anchor"> fails to put anything in the 'Referenced Articles' section.

Empty 'Referenced Articles' Sections

If a number of named articles are linked to from an article, then in some circumstances empty 'Referenced' sections are displayed with a header but no links. You can see this here.

Closed Tag with Named Articles, Forums, Categories

Linking to named articles, Forums or categories with the closed version of the tag, as in <LINK H2G2="GuideML-Clinic"/>, does not work properly. It simply puts an 'A' as the link text, though the link will work.

Effects in Links

If the text between <LINK> tags contains text effects such as italics, then that part of the text will not be displayed in the Article Data box.

Wrong Attribute

Links will not necessarily work if the wrong attribute is used, so please don't use tags like <LINK HREF="/A123456"> or <LINK H2G2="U123456">.

Example One

This is a numbered-article link to the h2g2 article on Preparing a Chicken.

<P>This is a numbered-article link to the article on <LINK H2G2="A260281">Preparing a Chicken</LINK>.</P>

Example Two

This is a named-article link to the GuideML Clinic.

<P>This is a named-article link to the <LINK H2G2="GuideML-Clinic">GuideML Clinic</LINK>.</P>

Example Three

This is an external link to the BBCi website and the link is displayed in the 'Referenced Sites' section as 'Click here to visit the BBC!'.

<P>This is an external link to the <LINK TITLE="Click here to visit the BBC!" HREF="http://www.bbc.co.uk/">BBCi website</LINK> and the link is displayed in the 'Referenced Sites' section as 'Click here to visit the BBC!'.</P>

Example Four

This is a bio-link to the Editor's Personal Space.

<P>This is a bio-link to the <LINK BIO="U13">Editor's Personal Space</LINK>.</P>

Further Information


Bookmark on your Personal Space


Conversations About This Entry

Entry

A1091080

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


References

h2g2 Entries

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