[pmwiki-users] Any idea for something like (:define ManagerOnDutyName=Abc Xyz:) ?

Pico pmwiki at ben-amotz.com
Fri Jul 28 07:47:14 CDT 2006


Christophe David wrote:
> Would somebody have an idea how to "define variables" from wiki pages 
> like this
> 
> In a given page (set in a cookbook ?), something like :
> 
>           (:define ManagerOnDutyName=Abc Xyz:)
>           (:define ManagerOnDutyPhone=0123456789:)
> 
> In order to allow in any other page
> 
> "In case of problem, please call (:ManagerOnDutyName:) on 
> (:ManagerOnDutyPhone:)".
> 
For the simple situation you describe above, you might just consider 
using an include directive to grab a portion of a page and have in 
included on other pages.  (In that case, you would probably just want to 
type out the full message ("In case of problem....") and include it, 
instead of creating its components and piecing it together. You could 
place the include directive on a groupheader if you wanted it appear on 
all pages in a group.

To do what you describe with variables, I would take a look at Dominique 
Faure's excellent PageVariableExtensions cookbook recipe.

Pico




More information about the pmwiki-users mailing list