[pmwiki-users] How to change title to do only first one on page

Patrick R. Michaud pmichaud at pobox.com
Wed Feb 15 06:51:47 CST 2006


On Wed, Feb 15, 2006 at 12:27:27AM -0600, Chris Cox wrote:
> Here's the title markup... I'd like to set a flag or check the value
> of the set variable to prevent subsequent title markups from
> getting processed for a page.
> 
> Any way to put an 'if' inside the action below??
> 
> ## (:title:)
> Markup('title','>&',
>   '/\\(:title\\s(.*?):\\)/ei',
>   "PZZ(\$GLOBALS['PCache'][\$pagename]['title']=PSS('$1'))");

Is this so that (:title:) inside of included pages isn't treated
as the current page's title?  

I'll quash that particular buglet in the next beta.

The "easiest" way to get an 'if' in the action is to use
a ternary ?: conditional.  Or possibly one could use the SDV()
function.

Pm




More information about the pmwiki-users mailing list