[pmwiki-users] Function in .tmpl file

Thomas Lederer celok at gmx.net
Fri Mar 17 07:50:34 CST 2006


Thanks for the quick response,

works great (had to split the vars, but thats ok).

When done i would write the script in the cookbook, as i feel that LDAP
is not that much documented yet.

BTW: the <!--function: thingy should be documented as well... where
should that go?

Tom

Patrick R. Michaud schrieb am 17.03.2006 14:29 Uhr:
> 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