[Pmwiki-users] (:noleft:) layout questions

Patrick R. Michaud pmichaud
Wed Dec 22 13:31:38 CST 2004


On Wed, Dec 22, 2004 at 07:52:04PM +0000, Hans Bracker wrote:
> Wednesday, December 22, 2004, 6:42:12 PM, Patrick wrote:
> 
> > My best suggestion (other than "go ahead and use tables") might be to get
> > (:noleft:) to change the CSS margins in addition to removing the left
> > sidebar.  That is what the $HTMLStylesFmt[] array is for, after all --
> > to allow dynamic changes to the CSS based on page contents.
> 
> I like to try this, before going back to a table based layout :)
> 
> Please excuse my ignorance of PHP programming.
> How do I include
>      $HTMLStylesFmt[] = "#main {margin:0;}";
> which strips the wide left margin in my css layout sheet,
> into
>      Markup('noleft','directives','/\\(:noleft:\\)/e',
>          "PZZ(\$GLOBALS['PageLeftFmt']='')");
> which is in config.php
> ?

Try:

   function NoLeftBar() {
     global $HTMLStyleFmt, $PageLeftFmt;
     $PageLeftFmt = '';
     $HTMLStylesFmt[] = "#main { margin:0; }\n";
     return '';
   }

   Markup('noleft','directives','/\\(:noleft:\\)/e', "NoLeftBar()");

Pm



More information about the pmwiki-users mailing list