[pmwiki-users] redefine existing (default)markup

Patrick R. Michaud pmichaud at pobox.com
Thu May 24 07:31:54 CDT 2007


On Thu, May 24, 2007 at 01:02:49PM +0200, noskule wrote:
> hi list
> I try to change the existing page-section markup to
> 
> Markup('noright', 'directives',
>    '/\\(:noright:\\)/ei',
>    "SetTmplDisplay('PageContentHeaderRightFmt',0) .
>    SetTmplDisplay('PageRelatedNavigationRightFmt',0) .
>    SetTmplDisplay('PageContentRightFmt',0)");
> 
> this only works if I change "noright" to somthing else. The code I
> placed in skin.php. Is this susposed to work or do I miss something?

Since skin.php is loaded after the standard markup definitions
(in stdmarkup.php), any redefinitions of existing markups must
first clear out the previous definition:

  unset($MarkupTable['noright']);
  Markup('noright', 'directives',
     '/\\(:noright:\\)/ei',
     "SetTmplDisplay('PageContentHeaderRightFmt',0) .
     SetTmplDisplay('PageRelatedNavigationRightFmt',0) .
     SetTmplDisplay('PageContentRightFmt',0)");
 
Pm 



More information about the pmwiki-users mailing list