User:Michael Große (WMDE)/WikibaseSiteLinksDoku

The following text is a draft for explaining how to enable sitelinks on 3rd party Wikibase installations. It is to be inserted as another  on Wikibase/Installation.

1. Decide and enable your site groups
First, you have to think about how to group the wikis you would like to see in your sitelinks section. By default, groups for the Wikimedia wikis are preconfigured, but they may not be that useful to a custom installation where you might prefer your own groups.

the default Wikimedia wiki groups

 * These groups are configured by default
 * Install the Extension:WikimediaMessages extension to get the correct headings

your own groups
Add them towards or replace the content of  with the groups you would like to see there.

For example, consider the following line being added to :

This will allow three groups in the SiteLinks box in the Item's page:
 * the standard defined  for the global Wikipedia sites
 * two custom wikis groups – here named  and   just for example – corresponding to the content of   in the   table as explained above

Localize your own groups
To show the correct heading for your own groups, you have to create the page with the desired heading as text. You can create subpages to set the heading in different languages, e.g.  to create the German heading.

2. Add the Wikis to the sites table
To be able to add sitelinks to wikis, you need add your wiki to the sites table. Take care that the group name used there is one of the group names you added above. Please also note, that you need to set both the file path and the page path and they do need to include the  placeholder!


 * See the instructions for adding sites to the sites table

After you touched Mediawiki's  table, you should rebuild Wikibase's   table. To do that, run the following command from your Mediawiki's root directory:

3. Verify that you can add sitelinks
Go  in your wiki and try to link an existing page on one of the above configured sites to an existing Item. It should either work or give you a useful error message.