This is a static copy of the main site, preserved for historical purposes only. Please see this page for more information.

Help with Macros/Double Step LinksHere


So you want to create an automatic list from wiki entries? Let's take the example of a public gallery that has entries for all the rooms they display art in and entries for all the artists they have. We are going to make an automatic list of artists that display in the "Red Room". This can be done one of two ways, either a relatively simple LinksHere macro, or a more advanced Double Step LinksHere. The latter can be a bit complicated until you get familiar with how the wiki works and how LinksHere and redirects in specific work. But it can also be an elegant way to manage your wiki.

Direct LinksHere

If you have a link on each artist page saying something like 'This artist's work can be found in the ["Red Room"]', you can place the macro [[LinksHere]] on the "Red Room" entry, and it will insert a list of all entries that link to that "Red Room" entry.

The drawback to this method is that the list contains every link to the "Red Room", including entries like the Front Page and even comments. As a result you get not just a list of artists, but a list of every single page on your entire site that contains a link to the "Red Room" entry.

The solution is to be a bit sneaky and create an entry only used for artists, but that goes to the same place.

Double Step LinksHere

First, create a new entry named ["Displayed in the Red Room"] that redirects to ["Red Room"]. Anybody going there will be quietly redirected to the "Red Room" entry as if they had clicked on a link.

Next, link the artists to the "Displayed in the Red Room" with something like the text 'This artist's work is ["displayed in the Red Room"]'.

Finally, in the entry "Red Room", you can add a list of all artists that display in that room by placing something like the following in it:

=Artists on Display=
[[LinksHere(Displayed in the Red Room)]]

As a helpful touch and to prevent some confusion, you might also want to add a editor comment. The comment will only be visible to people editing the entry:

=Artists on Display=

## To add to this list, go to the artist's entry and add a link to "Displayed in the Red Room".

[[LinksHere(Displayed in the Red Room)]]


This is a Wiki Spot wiki. Wiki Spot is a 501(c)3 non-profit organization that helps communities collaborate via wikis.