GuideML: SITEFILTER Tag

1 Conversation

The <SITEFILTER> tag lets you tailor your Personal Space to look different on different sites powered by the DNA engine. This might be useful if you are a member of two quite different DNA sites, and want your Space to say different things depending on where your Space is being visited from.

This tag only works in Personal Space Introductions; it will be ignored in articles. As a result this tag does not form part of Approved GuideML.

Syntax and Usage

Optional attributes are shown in italics.

<SITEFILTER EXCLUDE="1">

<SITE NAME="...sitename..."/>
<SITE NAME="...sitename..."/>

...

<CONTENTS>

...content...

</CONTENTS>

</SITEFILTER>

Here's how to use the <SITEFILTER> tag:

  • If EXCLUDE="1" is present then the content will be shown in all DNA sites except for the ones listed in the <SITE> tags. If it is not present, then the content will only be shown in the DNA sites listed.

  • The <SITE> tags each take a ...sitename... argument, giving the name of a DNA site (the name of a DNA site can be found from the URL of that site, which starts with www.bbc.co.uk/dna/sitename/ and should be in lower case). You can include multiple <SITE> tags if you want to filter content over a number of DNA sites.

  • The ...content... section can contain any GuideML that can be used inside the <BODY>...</BODY> section.

Known Issues

You cannot nest SITEFILTER tags. If you do, you will probably get a Server Error when your personal space is viewed in certain sites.

Example One

The following example will display the relevant content in both h2g2 and 360 (but not in other DNA sites).

<SITEFILTER>
<SITE NAME="h2g2"/>
<SITE NAME="360"/>
<CONTENTS>
This will be displayed in 360 and h2g2.
</CONTENTS>
</SITEFILTER>

Example Two

The following example will display the relevant content in all DNA sites except h2g2.

<SITEFILTER EXCLUDE="1">
<SITE NAME="h2g2"/>
<CONTENTS>
This will not be displayed in h2g2.
</CONTENTS>
</SITEFILTER>

Further Information


Bookmark on your Personal Space


Entry

A1098867

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