[pmwiki-users] Markup to change page variable
Hans
design5 at softflow.co.uk
Sun Jan 27 07:22:29 CST 2008
Sunday, January 27, 2008, 12:58:57 PM, Anke Wehner wrote:
> I have a page variable $CommentPage, which usually is Comments-{$FullName}
> What I'd like to be able to do is putting a markup tag on specific
> pages to change $CommentPage - to have two or more wiki pages share
> one comment page.
Perhaps try this instead:
Add to config.php:
//comment page default
$CommentPage = 'Comments-{$FullName}';
//check for CommentPage PTV
$compage = PageTextVar($pagename, 'CommentPage');
// no PTV? Set to default
if(!$compage) $compage = $CommentPage;
//define page var {$CommentPage}
$FmtPV['$CommentPage'] = "'$compage'";
Then you can set on any page an alternative with a PTV
(:CommentPage: AltCommentPage:)
and use PV {$CommentPage} in all links and form target definitions
etc.
~Hans
More information about the pmwiki-users
mailing list