[pmwiki-users] pagelist backlinks from hidden page text variable links

Russ pmwiki at russhosting.com
Mon May 16 07:46:09 CDT 2016

Instead of using "pagelist link=", you should be able to remove the link 
brackets from the PTV (i.e. :localptv:Group.Name: ) and generate the 
pagelist using the PTV value:  "pagelist $:localptv=Group.Name"



On 2016-05-16 3:21 AM, Profound Darkness wrote:
> Hello,
> My first post to the/a mailing list!
> I'm wondering if there is a way to get PmWiki pagelist to find links 
> in hidden page text variables which are not explicitly used in the 
> page.  A bit of a long question, sorry.
> (Simplified) Example:
> I have a 'generic page' where I collect information in hidden page 
> text variables similar to this:
>   (:Title generic page:)
>   (:localptv:[[group/name]]:)
>   (:include template#GenericPageTemplate:)
> Then there is the 'template page' which handles the rendering of that 
> information via the include above, the excerpt looks like this:
>   [[#GenericPageTemplate]]
>   some text... {*$:localptv}
>   [[#GenericPageTemplateEnd]]
> Now when I try on some 'other page' to get a pagelist like this:
>   (:pagelist link=group.name:)
> I do not see 'generic page' come up in the list.
> To try and piece this apart some and figure out what is going on, as a 
> test I altered 'generic page' to look like this:
>   (:Title generic page:)
>   (:localptv:[[group/name]]:)
>   (:include template#GenericPageTemplate:)
>   >>comment<<
>   {$:localptv}
>   >><<
> Now the pagelist shows 'generic page' in the list.  However I'd like 
> to just type in the information on 'generic page' and move on.  I 
> thought maybe if all page text variables were listed in a comment 
> (example concept below) things might work out but I'm not aware of 
> such a feature in PmWiki.
> concept example:
> >>comment<<
>   {$:*}
>   >><<
> So I thought, maybe I'd try, in vim, to put something like that 
> together.  After quite a lot of looking around and searching the code 
> I came up with some stuff I put into config.php.
> function print_ptvs($array){
>   $string = "";
>   foreach ($array as $key => $val) {
>     $string .= $key . "=" . $val;
>   }
>   return $string;
> }
> $FmtPV['$AllPTV'] = 'print_ptvs(@$PCache[$pagename])';
> #$FmtPV['$AllPTV'] = 'print_ptvs(@$page)'; # this also presents the 
> same view of information.
> ### end code ###
> This leads me down a bit of a side track where IF no page text 
> variables are used on the parent page (ie 'generic page') then they 
> are not shown when I use my new {$AllPTV} page variable, implying they 
> are not cached.  If I use at least one page text variable in the 
> parent page, ALL the page text variables show up from {$AllPTV}.
> Leaving behind the side track, when all page text variables are shown 
> from [$AllPTV}, the pagelist still does not show 'generic page' in the 
> list.  It would seem this pathway is a bad one as the link collection 
> for pagelist is happening in a different way from what I thought I 
> understood.
> So I'm wondering if someone might have a bright idea for what I should 
> try next.  For now I'm looking at making sure to explicitly reference 
> all page text variables with links in a comment on each page, a fair 
> bit of extra typing in some cases when the idea was to reduce the typing.
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20160516/bcedb928/attachment.html>

More information about the pmwiki-users mailing list