[pmwiki-users] using PTVs from pagelists in skin scripts (or how to register a new PV)

a.sonderhoff at gassi-tv.de a.sonderhoff at gassi-tv.de
Fri May 11 03:29:56 CDT 2012


Here is my problem. #1 and #2 are for further background only. I am basically trying to use PVs and PTVs of the newest page in a certain group when visiting another page in another group within a script referenced by the active skin’s .tmpl file by using a pagelist.

1) I have a simple custom skin which loads a script into a div with <!--file:$SkinDir/somescript.php-->

2) the somescript.php basically does this:

<?php if (!defined('PmWiki')) exit();
global $pagename;
$imageLink = PageVar($pagename,'$:image');
echo MarkupToHTML($pagename, "Attach:$imageLink");

3) (:image: …:) is set on SomeGroup.SomePage

4) I have a pagelist in SomeOtherGroup.SomeOtherPage which basically does this:

(:pagelist fmt=somePagelistFmt group=SomeGroup count=1 order=-ctime name=-*Recent*,-GroupAttributes:)

5) #somePageListFmt is defined in LocalTemplates as

[[#somePageListFmt]]
(:template each:)
(:title {=$Title}:)
(:image: {=$:image}:)
! {=$Title}
Attach:{=$:image}
[[#somePageListFmtend]]

6) what happens on SomeOtherGroup.SomeOtherPage is, that {$Title} is set by the pagelist while {$:image} is not. both are displayed correctly in the further output of the pagelist template. this is driving me mad (already tried to circumvent this with a real PV, which failed due to my lack of understanding of PmWiki’s $FmtPV[] / setProperty()). any ideas on what I am doing wrong?

thx a lot in advance
josh


-- 
GASSI TV® brand & marketing

office +49 2238 4629519
mobile +49 1511 5794189
fax    +49 2238 963023
email  <a.sonderhoff at gassi-tv.de>
web    <http://gassi-tv.de>

moving pixies GmbH
Aurikelweg 22
DE-50259 Pulheim
Geschäftsführer: Daniel Sonderhoff
Amtsgericht Köln, HRB 74273


Save the world — Don't print this e-mail!




More information about the pmwiki-users mailing list