[pmwiki-users] Bug with SetTmplDisplay in preview handling?

Hans design at flutesong.net
Mon Mar 7 08:41:29 CST 2005


Monday, March 7, 2005, 2:09:49 PM, Patrick wrote:
> No, PageRightFmt is indeed being suppressed through the above.
> However, previewing the page causes your (:showright:) markup to be
> rendered, which has the effect of turning PageRightFmt back on again.
> (The preview is rendered after the skin is loaded but before it's
> displayed.)

> So, it's not really a bug, although it could be a design misfeature.
> I'm open for suggestions on changing this, although I don't have any
> at the moment.

this is a little confusing to me.
If the condition
if ($action=='edit') { SetTmplDisplay('PageRightFmt', 0); ... };
does not apply when preview is invoked how can one set a condition
when preview applies?
But if I understood you correctly there is nothing a skin can do to
influence the page rendering when preview is invoked?
I tried an ugly hack to change the showright markup conditionally, but
it does not work:
#default showright markup:
Markup('showright','directives','/\\(:showright:\\)/e',
  "SetTmplDisplay('PageRightFmt', 1)");
#conditional showright markup:
if ($action=='edit') { 
Markup('showright','directives','/\\(:showright:\\)/e',
  "SetTmplDisplay('PageRightFmt', 0)"); 
  };

Any other idea for a hack, or better to address the "design
misfeature"?
  
Best, 
~Hans                           




More information about the pmwiki-users mailing list