Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

Backlinks

Summary: List pages with links to a target
Version: n/a
Prerequisites: pmwiki-2.0.0

Status: Documentation

Maintainer: Pm
Discussion: Backlinks-Talk
Users: +3 (view / edit)
Votes:

Question

  • How do I list the pages that link (backlink) to a certain page?
  • How do I find the pages that are linked to the current one?
  • How do I implement Wikipedia's "What links here" feature?

Description

PmWiki implements backlinks using the pagelist directive and its link= parameter. Here's an example showing the first ten pages pmwiki.org that link to the main Cookbook page:

(:pagelist link=Cookbook.Cookbook count=10:)
...
Backup /
CookbookBasics  Explains what the cookbook and its recipes are.
Cookbook /
AddPageForm-Talk  Talk page for AddPageForm.
ASCIIMath  Display MathML rendered ascii formula into PmWiki 2.x pages (Stable)
AttachLinks  Get Attach: links to display by default without the "Attach:" prefix
BreakPage  Breaks pages into sections with inserted markers and displays one section at a time (Stable)
CookbookBasics  Explains what the cookbook and its recipes are.
DynamicPageActions  Dynamic PageActions
ExportHTML  Export PmWiki pages as "static" HTML pages
HandleICal  Add-on for wikicalendars to export/import events to/from ical-files (Beta)
ListOfBundles  List of commonly and successfully bundled recipes

...

Here's a way to create a simple list of links back to the current page:

(:pagelist link={*$FullName} fmt=simple:)

Here is a link you could include in your SideBar or as an "action link" in one of your skin's menus, as done on this site with the Gemini, FixFlow, and Lens skins. You can get a list of pages linking to the current page with just a click:

* [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]]

To include such a link in a skin template which does not use wiki pages for configuration of action links, you can add the following code to the skin template:

<a href='$PageUrl?action=search&q=link=$FullName'>$[Backlinks]</a>

Notes

See Also

Contributors

Comments

See discussion at Backlinks-Talk

User notes +3: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on October 17, 2013, at 09:01 PM