[Pmwiki-users] Re: list on a page all pages that refer to that page?

Andres Yver yver
Fri Mar 12 05:29:35 CST 2004


On Friday, March 12, 2004, at 04:21 AM, Lloyd Budd wrote:

>> <a href='$PageUrl?action=search&amp;text=$Title' title='Pages that 
>> link to this one'>Linked From</a>
> Yes, that seems to be about the same solution as presented in the two 
> threads that I listed in my previous email in this thread.  The 
> "problem" is this does not have the "references to this page" inline . 
>  In other words, on the same page as "this page".

Lloyd,
What about having a <!--PageLinkedFmt--> in your template file, between 
the  <!--PageText--> and <!--PageFooterFmt--> sections.

You'd need to define $PageLinkedFmt in your config.php file as that 
search, and add it to the list of $PageFmt that scripts/tlayout.php 
uses to draw the page:

SDV($BasicLayoutVars,array('HeaderText','PageHeaderFmt','PageLeftFmt',
   'PageTitleFmt', 
'PageText','PageRightFmt','$PageLinkedFmt','PageFooterFmt'));

If you'd like to remove a group from that search, add for example

$SearchExcludePatterns[] = '/^PmWiki\\./';

to your PerGroupCustomization file

To remove self-referencing links, i think you could also add

$SearchExcludePatterns[] = '/\\.(All)?ThisPage$/';

To search within a group, see

http://www.pmichaud.com/wiki/Cookbook/SearchGroup

andres




More information about the pmwiki-users mailing list