[pmwiki-users] (:title:) of (:include:) included pages overrides page title

Oliver Betz list_ob at gmx.net
Thu Feb 5 12:38:49 CST 2009


Petko Yotov wrote:

[...]

>> > > * the page itself should IMO have top priority.
>> > > * header and footer could be evaluated next
>> > > * (:title:) from included pages should be controlled by a
>> > > configuration. I would disable it.
>> >
>> > Excellent. I like very much these ideas, and I believe such a solution
>> > will solve all currently percieved problems. I'll think about some
>> > implementation, either Cookbook, or to the Core.
>>
>> I wonder if it works if we simply process the (:title:) markup
>> before (:include:), and set it so that "first title wins".
>
>Yes. This code seems to work :
>
> Markup('title','<include',
>  '/\\(:title\\s(.*?):\\)/ei',
>  "PZZ(IsEnabled(\$GLOBALS['PCache'][\$pagename]['=p_title'], false) ||
>    PCache(\$pagename,
>    \$zz=array('title' => SetProperty(\$pagename, 'title', PSS('$1')))))");

I can't understand easily what yo are doing <g>, but I can test:

The code above eliminates the title from included pages, but (:title:)
from GroupHeader still overrides (:title:) on the page.

Oliver




More information about the pmwiki-users mailing list