[pmwiki-users] question about headings
    Chris Cox 
    ccox at airmail.net
       
    Tue Aug 21 23:07:21 CDT 2007
    
    
  
Replacing first header on a page, inside your config.php:
(off the top of my head)
Markup('^!', 'block',
  '/^(!{1,6})\\s?(.*)$/e',
  "MyHeadings('$1','$2')");
$FirstHeaderDone=false;
function MyHeadings($exclam, $headertext) {
        global $FirstHeaderDone;
        if (!$FirstHeaderDone) {
                $FirstHeaderDone=true;
                // This is where you do something different with
		// first header.
                return '<:block,1><h'.strlen($exclam).PSS(">First
Heading $headertext</h").strlen($exclam).'>';
        } else {
                return
'<:block,1><h'.strlen($exclam).PSS(">$headertext</h").strlen($exclam).'>';
                                                                      	}
}
    
    
More information about the pmwiki-users
mailing list