<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>
<div dir="ltr">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hello,</div><div dir="ltr"><br></div><div dir="ltr">My first post to the/a mailing list!<br><div><br></div><div>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.</div><div><br></div><div>(Simplified) Example:</div><div><br></div><div>I have a 'generic page' where I collect information in hidden page text variables similar to this:</div><div><div> (:Title generic page:)</div><div> (:localptv:[[group/name]]:)</div><div> (:include template#GenericPageTemplate:)</div><div><br></div></div><div>Then there is the 'template page' which handles the rendering of that information via the include above, the excerpt looks like this:</div><div><div> [[#GenericPageTemplate]]</div><div> some text... {*$:localptv}</div><div> [[#GenericPageTemplateEnd]]</div></div><div><br></div><div>Now when I try on some 'other page' to get a pagelist like this:</div><div><div> (:pagelist link=group.name:)</div></div><div><br></div><div>I do not see 'generic page' come up in the list.</div><div><br></div><div>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:</div><div><span style="font-size: 12pt;"> (:Title generic page:)</span></div><div><div> (:localptv:[[group/name]]:)</div><div> (:include template#GenericPageTemplate:)</div></div><div> >>comment<<</div><div> {$:localptv}</div><div> >><<</div><div><br></div><div>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.</div><div><br></div><div>concept example:</div><div><div><span style="font-size: 12pt;"> >>comment<<</span></div><div> {$:*}</div><div> >><<</div></div><div><br></div><div>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.</div><div><div><span style="font-size: 12pt;">function print_ptvs($array){</span></div><div><div> $string = "";</div><div> foreach ($array as $key => $val) {</div><div><span style="font-size: 12pt;"> $string .= $key . "=" . $val;</span></div><div><span style="font-size: 12pt;"> }</span></div><div> return $string;</div><div>}</div></div><div><span style="font-size: 12pt;">$FmtPV['$AllPTV'] = 'print_ptvs(@$PCache[$pagename])';</span></div><div>#$FmtPV['$AllPTV'] = 'print_ptvs(@$page)'; # this also presents the same view of information.</div><div><span style="font-size: 12pt;">### end code ###</span></div></div><div><br></div><div>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}.</div><div><br></div><div>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.</div><div><br></div><div>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.</div></div>
</div>
</div></body>
</html>