[pmwiki-users] Function in .tmpl file

Patrick R. Michaud pmichaud at pobox.com
Fri Mar 17 07:29:57 CST 2006


On Fri, Mar 17, 2006 at 02:22:56PM +0100, Thomas Lederer wrote:
> What i can not get done: call the function from the template with a
> parameter.
> 
> We had <!--function:FuncName--> earlier in the list, but how do i pass a
> parameter like "LastModifiedBy" or "AuthID" for processing

<!--function:FuncName LastModifiedBy-->

Your function is then declared as:

    function FuncName($pagename, $args) { ... }

where $pagename is the name of the page being processed, and
$args is "LastModifiedBy" (or whatever came after the function
name in the directive).

> I would also be happy if i could define the function in config.php so
> that the "real name" is accessible through a $LastModRealName and/or
> $AuthIDRealName variable... (i actually need both)

If you can forward your function, or at least let me know how
it's called, I can give an example of turning it into a page
variable.

Pm




More information about the pmwiki-users mailing list