Tagging System

Restructuring the Codex

We are currently moving articles around and changing the general structure of the Codex. Please come back later if you get lost!
 
written by Ondo, update by SoulLink
Tags are a quick way of organising your world's articles and, unlike categories, you can have multiple tags in a single article. However, tags don't appear in the homepage like categories do, meaning they can't replace categories.  

Usecases for tags

Tags are a way to organize articles and other resources within your world beyond categories. When starting out just using categories for your organization is more than enough.   You should be using tags when you are trying to find a group of related articles which are not in the same category in your world. This can also be the case for your readers or players.   However, it makes sense to take some time to plan out your tags if you use them. It is easy to get lost or add tags with typos. The best way currently to maintain your tags is to use an interactive table, some kind of sheet, or your World Anvil Notebook.  

Creating Tags

A list of tags is always separated by a comma. In the shown interfaces the comma can be inserted with the ENTER key as well. Tags can be added to most other resources on World Anvil like Timelines, Historical Events, Maps and Images. This way they can be found with the same searches as the articles.

 

Conventions

Conventions are useful to make sure you can remember your tags and that they work properly in all situations. Keep in mind that these are not requirements.  
  • A common convention is to use a hashtag (#) prefix for all tags. But it is not necessary to do so. Just make sure to either always add a hash or never. However, when the tag is present it is always needed in any BBCode that require a tag as input like the [tagged], [taggedblock] and [diplomacy] BBCodes.
  • Do NOT use spaces within your tags.
  • Use a common writing convention:
    • CamelCase
    • hyphen-case
  • Avoid any special characters and diacritics.
  • Tags are case insensitive.
 

Using Tags

Tags can be used in several different ways. How you plan on using them will affect how you create them and apply them to your articles.  

List of Tagged Articles

However, the [tagged] BBCode offers an easy and flexible way to create a list of articles in your world. The syntax of the tag is:  
[tagged:TAG|TYPE|HEADER]
  This is how each parameter works:
  • TAG: this is the tag you want to list.
  • TYPE: use this to choose whether you want the list to be plain links or formatted article blocks. Type list for the former and block for the later.
  • HEADER: type the header of the list here. If you don't want to display any header, type none.
  For example, [tagged:water-spell|list|Water spell book] will generate a list of plain links with all articles tagged as #water-spell, and generate a h1 heading with the text Water spellbook.  
NOTE: Tags are matched to any tag that is the same or just contains the tag as long as it is an exact match. For example, the BBCode [tagged:train|block|Trains!] includes all articles with any of the following tags: #train, train-station, #trains and monorail-train.

User search

The search bar on the cover of each article can search tags in addition to titles. One search can always only match a single tag and the full search phrase must be present inside that tag. Don't search using the # prefix character.

Author Search

Any resources with a tag can be searched in the global search bar (Guild members only), in the Articles & Categories search bar and on the World Dashboard. This search works the same as the user search with additional functionality designed for the world author.

Diplomacy Web

Organizations can be displayed in a common diplomacy web using tags.
Diplomacy Webs
Generic article | Oct 29, 2023

A diplomacy web is an interactive diagram that visually displays relationships between several organizations in your world. Learn how to set one up with the diplomatic relationships of the involved organizations.

Special CSS Class

All tags are added as CSS classes to each article they are used on. The CSS class is prefixed with tag-. You can use this to apply a set of special layouts to specific articles. This does not work if the tag contains any spaces.
Categories
Generic article | Oct 29, 2023

Categories are used to organize articles into a hierarchy.

 

Navigation

 

FAQ

Is it possible to search an article with several tags?
No. You can only search for one specific tag. An article tagged with #humanoid and #dwarf will not show up if you search "humanoid dwarf".
Is it possible to use boolean logic to combine tags?
No. Every BBCode element which uses a tag as input can always only process a single tag.
 
The tagged BBCode returns at most a list of 150 articles at once. If the list is longer break it up into multiple lists.

Using tags with statblocks

You can also use tags with RPG blocks. While editing a block, go to the bottom of the page. There, you will find a Tags field that you can fill with your tags of choice. Then, you can use the [taggedblocks:TAG|TITLE] tag to create a list of blocks with that tag. For example, [taggedblocks:humanoid|Humanoid Creatures] will create a list of all blocks tagged as humanoid with a Humanoid Creatures header.   For more information on RPG blocks, read the guide to blocks:
Statblocks
Generic article | Oct 29, 2023

Learn about statblocks on World Anvil and how they can be used.

Community Guides

Advanced uses of Tags
Generic article | Nov 24, 2022

How to use tags to add content to an article, or create an Index of articles


Comments

Please Login in order to comment!
Aug 27, 2020 09:54

Is it possible to generate a [tagged] list with multiple criteria tags?   e.g. I have deities tagged by divine rank and alignment. Could I create a tagged list to show me all Greater Deities that are Lawful Good?

Aug 27, 2020 10:25

I don't think that's possible with the current system. But feel free to add a feature request!

[they/them] Creator of Black Light, a science-fantasy universe.
Jan 6, 2021 02:13

I can't seem to search by tag using the methods described here. When I search for "#mytag" or by "

" (or any other arguments to "tagged"). I am able to search for tags without the "#" successfully. Am I missing something, or is this article wrong?

Mar 3, 2021 02:59

When searching, don't use the #. So, to search for the tag #ranger, enter ranger (without the #).

Jan 6, 2021 02:14

I'm also seeing that two letter tags don't work... Is there a minimum number of letters for a tag?

Jan 6, 2021 08:49

Yes. All searches on WorldAnvil have a three-letter minimum.

Check out my world World Behind the Veil!
Mar 5, 2021 16:48 by Comatose Spectre

how would i set up a hyperlink to another article within a article, would i just use HTMLs <a> code or something else?

Mar 5, 2021 20:17

We have a mention system, it works similar to Twitter mentions! Just type the character followed by the first characters of the article you want to link to and pick from the drop-down list that will appear. I recommend the guides to the mention system and bbcode commands . Hope this helps!

[they/them] Creator of Black Light, a science-fantasy universe.
Mar 6, 2021 18:47

And apparently I messed up my reply, I'm sorry! I meant the "at" character, the one used to mention people on Twitter.

[they/them] Creator of Black Light, a science-fantasy universe.
Mar 9, 2021 16:56 by Comatose Spectre

awesome, ty

Jul 31, 2021 13:16 by Max
Jul 31, 2021 13:17 by Max

lol did not expect the tags to work here. Here it is sans braces: tagged:TAG|block|none

Jul 31, 2021 20:23

Tags are tied to a world, while the user stream is global. This means that if you call all articles with the tag "TAG", the system doesn't know which world you're talking about. I'm afraid this won't work in the user stream!   As for the BBCode in comments, yes, comments are fully BBCode-enabled! You can still type BBCode tags if you put them between [noparse] ... [/noparse] tags. For example, [noparse][tagged:TAG|block|none][/noparse] will display like this: [tagged:TAG|block|none]

[they/them] Creator of Black Light, a science-fantasy universe.
Sep 14, 2021 15:50

[tagged:#ingame_rule|block|UGGGG]   My tag is ingame_rule and I'm using above code in my article but it isn't pulling any of the articles with that tag. Any reason why?

Sep 16, 2021 20:56

Try it without the hashtag! The [tagged] tag looks for exactly what you type in it, so if your tag doesn't have a #, it won't show up. Let me know if this helps!

[they/them] Creator of Black Light, a science-fantasy universe.
Sep 18, 2021 01:05

Thanks Sage! That was it!

Nov 30, 2022 00:23 by Elise

Is there anyway to specify an order to a tagged list?

Nov 30, 2022 09:35

No, there isn't currently.

[they/them] Creator of Black Light, a science-fantasy universe.
Apr 22, 2023 00:32

Is there a way to see a list of all of the tags you've used in your world?

Apr 24, 2023 08:54

Not at this point! But the tagging system will be upgraded in a future update, and this could be part of that.

[they/them] Creator of Black Light, a science-fantasy universe.
Jul 18, 2023 18:41 by Alex Harlequin

How do tags work with regard to who sees them? If, for example, I wanted to (for my own reference) create a tag for members of a secret society. Would readers viewing the individual characters be able to see that tag? Can readers click on a tag and see all articles tagged with it? Can individual tags be made public or private?

If at first you don't succeed, have a cup of tea and try again.   Creator of Relativity, a science-fantasy time-travel universe.
Jul 19, 2023 08:29

Hi! Yes, tags are public under the Metadata section of the article (this guide has tags, so you can see how it looks by yourself! Click on "Metadata" and look to the right). Tags don't have visibility controls at the moment, although you're welcome to open a feature suggestion!

[they/them] Creator of Black Light, a science-fantasy universe.
Mar 17, 2024 23:28

I have used a number of tagged lists of articles but just tried with a tagged list of maps. The header shows up but not the list of maps. Are articles the only items that can show up in a list?

Mar 18, 2024 06:52

Yes, it looks like currently only articles can appear in tagged lists. You're welcome to suggest new features here though: https://www.worldanvil.com/community/voting/

[they/them] Creator of Black Light, a science-fantasy universe.