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

Chris Cox ccox at airmail.net
Wed Feb 15 09:45:51 CST 2006


Patrick R. Michaud wrote:
> 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.

Actually I kinda want the buglet.  Just want to control
whether it's last one in or first one in.

I know we discussed that this side effect could be
a potential feature.  Something to consider.

> 
> 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