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

Patrick R. Michaud pmichaud at pobox.com
Sun Feb 19 13:24:00 CST 2006


On Sun, Feb 19, 2006 at 08:17:38PM +0100, noskule wrote:
> Pm writes:
> >Sure, just redefine the (:noleft:) markup to get rid of all
> >of the sections you want.
> >
> >   Markup('noleft', 'directives',
> >     '/\\(:noleft:\\)/ei',
> >     "SetTmplDisplay('PageLeftFmt',0) .
> >      SetTmplDisplay('PageLeft2Fmt',0) .
> >      SetTmplDisplay('PageLeft3Fmt',0) ");
> >
> 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)");

That pattern looks very wrong with the asterisks around the backslashes
(maybe that was added by your mailer?)

At any rate, the problem is the extra quotes you have at the ends
of each of the SetTmplDisplay lines -- they should be

	"SetTmplDisplay('PageLeft1Fmt',0) .
 	 SetTmplDisplay('PageLeft2Fmt',0) .
 	 SetTmplDisplay('PageLeft3Fmt',0) ");

and not

	"SetTmplDisplay('PageLeft1Fmt',0)" .
 	"SetTmplDisplay('PageLeft2Fmt',0)" .
 	"SetTmplDisplay('PageLeft3Fmt',0)" );

In other words, the dots are supposed to be part of the string
passed to Markup().

Pm




More information about the pmwiki-users mailing list