Wikitravel has a feature to show '''bread crumb menus''' under the title of a destination article to show the countries and regions that a destination belongs to. This can make it easier to navigate the site and find bigger or nearby destinations. This page describes how to add a bread crumb menu to a page.

When to use

Breadcrumb navigation should be used for all destination articles. It should not be used for itinerary articles or travel topics, even if they are located within a geographical area.

Template:IsPartOf

To add a menu, you need to specify the next larger area that a place is in. For example, Montreal is in Quebec, and Germany is in Central Europe.

To say that a place is in another place, put the "isPartOf" template at the bottom of the page, with the name of the larger place. So, Montreal's guide has a line saying <nowiki>{{isPartOf|Quebec}}</nowiki>, and Germany's guide has a line <nowiki>{{isPartOf|Central Europe}}</nowiki>.

By convention, this template is placed at the end of the destination article.

  • If there are two "IsPartOf" lines, the breadcrumb navigation code only uses the last one.
  • You only need to specify the immediately next bigger area. Germany is in Europe, but we don't need to add <nowiki>{{isPartOf|Europe}}</nowiki> to the Germany page, since Central Europe is already marked as being in Europe.
  • Interaction with the caching system is poor. If you change the location of a larger entity, the cached pages for its contained entities are not updated. You can purge them using "action=purge" to cache and re-load the page.
  • Disambiguators won't be shown unless two parts of the hierarchy have the same ambiguous name (see, for example, New York (city)).
  • Template:IsIn

    The use of the IsIn template is deprecated. Use IsPartOf instead.

    The argument to the "IsIn" template ''must'' be in '''URL form'''. That is, spaces should be replaced by underscore ("_"), and non-ASCII characters must be URL-escaped. It is also case-sensitive. By far the easiest way to make this form of the name is to copy the name from a browser location bar.

    Troubleshooting

  • If the breadcrumb menu doesn't show up at all,
  • * Be sure that there is an IsIn template in the article
  • * Be sure that there isn't an invalid isIn hidden in the article text (this is occasionally a source of broken breadcrumbs)
  • * Be sure that the article name is in '''URL form''' if using the IsIn template. See above for the URL form rules. By far the easiest way to make this form of the name is to copy the name from a browser location bar.
  • If you've changed the IsPartOf setting for an article, or its parent, but the breadcrumb menu still shows the old contents, then likely the cached IsPartOf information is incorrect. Fix this by ''purging the cache''. You must do this with every article below the one which changed, down to the current article. Start with articles which are IsIn to the changed article, and work down to all articles which are IsIn them, and so on. (If you change the IsIn relationship of a top-level article, there can be a lot of caches to purge!)
  • * One way to purge the cache is by making an edit to the article and saving it.
  • * Another way to purge the cache is to: 1) click on the History tab of the article, giving the History page; 2) in the browser's location bar, find the string "action=history", and change it to "action=purge", then push the Enter key, giving a view of the article with no breadcrumb menu; 3) click on the Article tab, giving the article with a correct breadcrumb menu.
  • Under the covers

    The breadcrumb navigation code uses the RDF isPartOf relation defined by the IsPartOf template to determine the geographical hierarchy of a destination. The RDF defines the relationship between two places, and the navigation code reads that relationship.

    The code for the RDF extension to MediaWiki is in [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/RDF/ MediaWiki Subversion].

    See also: Wikipedia article on breadcrumb navigation