[pmwiki-users] include/style directives bugs/features?

Patrick R. Michaud pmichaud at pobox.com
Wed Mar 30 10:23:07 CST 2005


On Wed, Mar 30, 2005 at 10:42:56AM -0500, John Coxon wrote:
> 
> On Mar 30, 2005, at 10:35 AM, Patrick R. Michaud wrote:
> 
> >Ick, too many options.  I think I'd prefer to change the code so that
> >the first (:title:) wins.  There are a lot of reasons to do it this 
> >way.
> 
> Ick, that'll break all the many pages I so carefully put (;title:) at 
> the end of, to make sure it came last...

Okay, that doesn't work.  The other solution is to make sure that
(:title:) is processed before any include statements, and then
convert subsequent (:title:) statements to null text.  The following
can go into config.php:

    ## (:title:)
    Markup('title','<include',
      '/\\(:title\\s(.*?):\\)/ei',
      "PZZ(\$GLOBALS['PCache'][\$pagename]['title']=PSS('$1'))");

    Markup('title_', 'directives',
      '/\\(:title\\s(.*?):\\)/i',
      '');

and if there's enough demand for this I can throw it into the
core distribution.

Pm



More information about the pmwiki-users mailing list