[pmwiki-users] trouble with multiple use of <!--PageXXXFmt-->

noskule noskule at gmx.net
Sun Feb 19 13:17:38 CST 2006


On Sun, Feb 19, 2006 at 06:53:30PM +0100, noskule wrote:

>>Patrick R. Michaud schrieb:
>>    
>>
>>>On Sun, Feb 19, 2006 at 06:26:03PM +0100, noskule wrote:
>>>      
>>>
>>>>I try to make multiple use of 
>>>><!--PageXXXFmt--> function, but if I use them multiple times the hole 
>>>>page gets messed up.
>>>>
>>>>Is multiple use  not supported or do I somting worng here.
>>>>        
>>>>
>>>Multiple sections with the same name isn't supported.
>>>      
>>>
>>hm, and is there a way to get around it, so that I still could use 
>>(:noleft:), (:noright:), instead of noleft1 noleft2 . .. ..
>>    
>>
>
>Sure, just redefine the (:noleft:) markup to get rid of all
>of the sections you want.
>
>Currently (:noleft:) is defined as:
>
>    Markup('noleft', 'directives',
>      '/\\(:noleft:\\)/ei',
>      "SetTmplDisplay('PageLeftFmt',0)");
>
>You can change this to be something like:
>
>    Markup('noleft', 'directives',
>      '/\\(:noleft:\\)/ei',
>      "SetTmplDisplay('PageLeftFmt',0) .
>       SetTmplDisplay('PageLeft2Fmt',0) .
>       SetTmplDisplay('PageLeft3Fmt',0) ");
>
>which would cause (:noleft:) to disable three seconds.
>
>(You might want to give PageLeft2Fmt and PageLeft3Fmt more
>descriptive names.)
>
>Pm
>
>
>  
>
I did try this in the local.php and made 4 sections in the .tmpl file:
PageLeftFmt, PageLeft1Fmt, PageLeft2Fmt, PageLeft3Fmt,

Markup('noleft', 'directives',
	'/*\\*(:noleft:*\\*)/ei',
	"SetTmplDisplay('PageLeft1Fmt',0)" .
	"SetTmplDisplay('PageLeft2Fmt',0)" .
	"SetTmplDisplay('PageLeft3Fmt',0)");



PageLeftFmt shows up (the redifined markup seams to take effect) but the 
PageLeftXFmt sections are still there. I use

If I use

Markup('noleft', 'directives',
	'/*\\*(:noleft:*\\*)/ei',
	"SetTmplDisplay('PageLeftFmt',0)" .
	"SetTmplDisplay('PageLeft2Fmt',0)" .
	"SetTmplDisplay('PageLeft3Fmt',0)");


only PageLeftFmt disapears. Do you have any suggestions?




More information about the pmwiki-users mailing list