[pmwiki-users] question about headings
Chris Cox
ccox at airmail.net
Wed Aug 22 13:10:59 CDT 2007
Shi Sherebrin wrote:
> Chris Cox wrote:
>> 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')");
> ...
>> return '<:block,1><h'.strlen($exclam).PSS(">First
>> Heading $headertext</h").strlen($exclam).'>';
> ...
>
> what a roundabout way to do something that should be possible with just
> straight CSS, but very creative!
As mentioned earlier, CSS can't do this portably. Now, the style
for the FIRST heading can be changed using the technique I mentioned
and THEN you can use CSS to affect how that class is diplayed...
>
> ok, I see how the strlen converts the number of !!s into the heading
> level - cute. Could you please explain to me how the 'block' and
> '<:block,1>' syntax fits into the system? I'm not familiar with this, a
> pointer to an explanation on some website would be fine.
I think that may be internal to pmwiki. I merely took the header
markup routine out of stdmarkup.php and made the quick mod to test it
out.
>
> thanks,
> Shi.
>
>
More information about the pmwiki-users
mailing list