[pmwiki-users] Programming for the CookBook: $FullName
Patrick R. Michaud
pmichaud at pobox.com
Sun Oct 1 14:18:36 CDT 2006
On Sun, Oct 01, 2006 at 08:32:03PM +0200, Mike wrote:
> Hi all,
> I suppose this is a really easy one: I'm writing a custom directive
> and from within the PHP code behind this directive, I need to know the
> pagename which is calling the directive, e.g. "Main.Test". How can I
> access this variable from within my PHP code?
The variable is $pagename -- it's local to the context in which
your directive is being called. For example:
This calls the MyDirective() function, passing the current pagename
as an argument.
More information about the pmwiki-users