2

On a page like Wikipedia's Animal Farm there is a list of characters. Some items in this list could link to their own articles. In the navbox which is another list, at the bottom of this and other pages there are links to these articles.

Because the two lists of links are maintained manually they're not kept in sync. How to connect them, so that only updating one also causes the other to be updated?

Each article usually has an infobox listing aspects that differentiate between the subjects. This can also help to navigate around the subject. It should also by synced in some way. Perhaps the infobox is where the users enter the information that's used by the navboxes and lists.

4
  • Would it be okay if the list was kept in a third place, using template syntax (or Lua, assuming your wiki has Scribunto)?
    – svick
    Commented Nov 4, 2014 at 22:14
  • If necessary but the less confusing for the users the better. The wiki has Scribunto and Semantic MediaWiki. It would be nice if each article could also have an info box that has some sort of sync to these two types of lists.
    – Rob Kam
    Commented Nov 4, 2014 at 22:50
  • Are you asking about MediaWiki only, or wikis in general (many of which don’t have templates or the concept of infoboxes)?
    – unor
    Commented Nov 5, 2014 at 15:05
  • Only about MediaWiki, I've edited the title to state this.
    – Rob Kam
    Commented Nov 5, 2014 at 18:02

1 Answer 1

1

If you have SMW, the solution is extremely simple. You can list the pages in question by adding them to a specific category. The category members can then be listed in the format you prefer.

A simple list, suitable e.g. for use in the middle of text or for a non-distracting navigation box, is then as simple as {{#ask: [[Category:Finnish]] | format=list }}.

Fancier lists can then be produced in any format you consider suitable for the various tasks, see for instance the list of Finnish MediaWikis on WikiApiary which is essentially just:

{{#ask: [[Category:Finnish]]
| format=template
| template=Website card
}}

Of course you can add further conditions to filter the lists as needed, still keeping the list in a central place.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.