[pmwiki-users] PageTextVariables and Spaces
sti at pooq.com
sti at pooq.com
Tue Oct 30 14:31:58 CDT 2007
Hans wrote:
> I am using in a forum display template a placeholder to be replaced by
> info held in a PTV from an author's Profiles page:
>
> In the template:
> {Profiles.{$$author}$:info}
>
> In the Profiles page:
> (:info:some personal information here:)
>
> Now if an author signs with spaces in the name, the PTV will not be
> retrieved. If the author sign as 'Aunt Mabel' then
> {$$author} becomes 'Aunt Mabel' and
> {Profiles.{$$author}$:info} becomes {Profiles.Aunt Mabel$:info}
> which fails.
> {'Profiles.Aunt Mabel'$:info} does not work.
> Profiles.AuntMabel is Aunt Mabel's Profiles page. The link function
> eliminates the spaces successfully.
>
> How can I make it work even with spaces in author names?
You need to explicitly convert the name to a pagename. Try this:
{{(pagename "Profiles.{$$author}")}$:info}
More information about the pmwiki-users
mailing list