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

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 14 20:10:23 CDT 2005


On Wed, Sep 14, 2005 at 07:30:43PM -0400, DaveG wrote:
> >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
> >
> Not sure that this approach works in a generic fashion. The goal is to 
> have a 'backlink' link for every page. This approach would mean creating 
> a backlink page for every page that gets created -- since the page name 
> is hardcoded. 

The Backlinks page remains the same in each case,
the value to link= in the URL changes depending on whatever
page you want to display.  See, for example:

    http://www.pmwiki.org/wiki/Test/Backlinks?link=Main.WikiSandbox
    http://www.pmwiki.org/wiki/Test/Backlinks?link=Cookbook.Cookbook
    http://www.pmwiki.org/wiki/Test/Backlinks?link=PmWiki.BasicEditing
  
> We could make this work is we can pass a parameter into a 
> page. The Backlink page would be something like:   
>    (:pagelist link={$PASSED_IN_THRU_URL} fmt=bygroup list=normal:)

The (:pagelist:) directive already uses parameters coming in from urls.
That's why

    (:pagelist fmt=bygroup list=normal:)

will display a list of backlinks if "link=" is supplied in the
url.

However, "?action=backlinks" (for any page) is now a candidate for
inclusion in the core distribution -- 
see http://www.pmwiki.org/wiki/PITS/00520 and cast a vote there.  :-)

Pm




More information about the pmwiki-users mailing list