[pmwiki-users] How can I use PageVariables the page in the CustomMarkup?

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 2 09:53:14 CDT 2008


On Wed, Apr 02, 2008 at 03:08:53PM +0600, Anton Shevtsov wrote:
>    Hello,
> 
>    How can I use PageVariables the page in the CustomMarkup?
>    I am writing in local/config.php
> 
>    Markup("some_edit", "directives", "/\\(:some_edit:\\)/","foo bar
>    {$AuthId}");
>    or
>    Markup("some_edit", "directives", "/\\(:some_edit:\\)/",Keep("<b>HTML</b>
>    {$AuthId}") );
>
>    and nothing happens..
> 
>    Page Variables can not be used in the Markup?

Because you have the above strings in double-quotes, PHP will
substitute them as PHP variables instead of page variables.

However, in this case it should work, as $AuthId is the correct
PHP variable to use here.  Make sure you that the Markup() calls
above occur _after_ $AuthId has been set (i.e., after loading
authuser.php).

Hope this helps,

Pm




More information about the pmwiki-users mailing list