Mobile app version of vmapp.org
Login or Join
Chiappetta492

: In a MediaWiki wiki, how to keep a navbar and list in sync? 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.

@Chiappetta492

Posted in: #Data #Mediawiki #SemanticWeb #Template

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Chiappetta492

1 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme