[pmwiki-users] Group Title?
dausha at gmail.com
Thu Jun 1 17:46:45 CDT 2006
On 6/1/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Thu, Jun 01, 2006 at 10:49:10PM +0200, Dominique Faure wrote:
> > On 6/1/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > >But even if it doesn't work, I think one might be able to do
> > >
> > > $FmtPV['$GroupTitle'] =
> > > 'PageVar("$group.GroupAttributes", '$Title')';
> > >
> > >which would grab the title of the GroupAttributes page.
> > >The downside would be that if a GroupAttributes page doesn't
> > >exist or doesn't have a title, then $GroupTitle would be
> > >'GroupAttributes'.
> > Then :
> > $FmtPV['$GroupTitle'] =
> > '(($t = PageVar("$group.GroupAttributes", '$Title')) ==
> > "GroupAttributes") ? $AsSpacedFunction($group) : $t';
> > should do the trick, no?
> Yes, I think so. I haven't tried it, myself.
Syntax of both broke because the single quotes around $Title expose
$Title at the string-definitnion. Can't double quote, or the variable
is not populated. Therefore, I escaped with a slash (e.g. \'$Title\')
and it worked.
"Mundus vult decipi, ergo decipiatur"
More information about the pmwiki-users