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

Profound Darkness pro_d77 at hotmail.com
Mon May 16 02:21:09 CDT 2016

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.

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

More information about the pmwiki-users mailing list