[pmwiki-users] custom markup problem

noskule noskule at gmx.net
Mon Apr 28 03:36:21 CDT 2008


hi list
I have a problem with a cutom markup. If I put a div directive into the 
contentbox markup the style definition of the div is messed up:
    '\"height:200px;'
instead of the whole definition.
Does anyone have an idea what's the problem?
thanks for any hints
nos

(:contentbox title="Page Form Elements"  style="float:left":)
(:div style="height:200px; background:yellow;overflow:auto":)
(:pagelist list=all group=PageFormElements name=-HomePage fmt=#title:)
(:divend:)
(:contentboxend:)

<div class='contentboxframe' style='float:left'><span class='boxhead'>Page Form Elements</span>
<div class='contentbox'>
<div style='\"height:200px;' >
<div class='fpltemplate'><ul><li><a class='wikilink' href='http://netstreams.org/projekt/cms/index.php/PageFormElements/AccessCode'>Access Code</a>

</li><li><a class='wikilink' href='http://netstreams.org/projekt/cms/index.php/PageFormElements/Author'>Author</a>
...
...

</li></ul>
</div>
</div>
</div>
</div>


Markup('contentbox', 'directives', 
"/\\(:contentbox\\s+(.*?)\\s*:\\)(.*?)\\(:contentboxend:\\)/se",
  "MakeContentbox(\$pagename, ParseArgs(PSS('$1')), '$2')");


function MakeContentbox($pagename, $args, $content) {
    $title = $args['title'];
    $style = $args['style'];
    if ( $style != '' ) $style = "style='$style'";
    $out = "<div class='contentboxframe' $style><span 
class='boxhead'>$title</span>
<div class='contentbox'>\n
$content
\n
</div>\n
</div>\n";
    return $out;
    }



More information about the pmwiki-users mailing list