How to create logged in & follower-specific content in Article Tutorials Knowledge Base | World Anvil
    Learn     Article Tutorials

How to create logged in & follower-specific content

Creating specific sections for different types of users can be really useful. For example, you could show the follow button only to people who don't follow you, and encourage your followers to join your community instead. Here's how you can do it!

 

The user state tag

This all works thanks to the [userstate] BBCode tag. Take a look at this example:

 
[userstate:follower]This content will only be showed to followers of your world![/userstate]
(In a real article, the sentence between the tags would be displayed to readers who follow the world only)
 

As you can see in the example, the tag affects everything you put between the opening and closing tags. There are four different supported options (including follower here's all of them:

 
  1. loggedin: The content will only be shown to logged-in users.
  2. loggedout: This will only be shown to logged-out users.
  3. follower: This will only be shown to followers of the world (which can only be logged-in users).
  4. notfollower: This will only be shown to logged-in users who don't follow the world (logged-out users won't see it).