[pmwiki-users] Dur: How to find all the pages which link TO a page?

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 14 08:54:04 CDT 2005


On Tue, Sep 13, 2005 at 07:01:45PM -0400, DaveG wrote:
> I've added a tab to my page to allow users to see backlinks. I'm using 
> the format:
>    <a id='backlink' 
> href="$PageUrl?action=search&q=link={$FullName}">$[backlinks]</a>
> 
> Which works. But I'd like to include some of the parameters I use when I 
> use the directive:
>    (:pagelist link={$FullName} fmt=bygroup list=normal :)
> 
> I tried this:
>    <a id='backlink' 
> href="$PageUrl?action=search&q=link={$FullName}%20fmt=bygroup%20list=normal">$[backlinks]</a>

I think this will work:

    <a id='backlink'
      href='$PageUrl?action=search&amp;q=link=$FullName&amp;fmt=bygroup&amp;list=normal'>$[backlinks]</a>

> What I'd ideally like is to have the backlist tab display as it does 
> when I use the directive, rather than in the Search results page. Any 
> way to achieve that?

There are a couple of mechanisms.  One is to create a Backlinks page
containing simply:

    (:pagelist fmt=bygroup list=normal:)

and then you can use that page to display backlinks to any other page.
For example

    http://www.pmwiki.org/wiki/Test/Backlinks?link=Main.WikiSandbox

shows the backlinks to Main.WikiSandbox, while

    http://www.pmwiki.org/wiki/Test/Backlinks?link=PmWiki.BasicEditing

shows the backlinks to PmWiki.BasicEditing.

Still, this comes up frequently enough that I suppose it's worth
having "?action=backlinks" available for any page, so I'll see
about a recipe for that, or possibly adding it to the core if there
are sufficient favorable votes.  (The code to do it is short.)

Pm





More information about the pmwiki-users mailing list