[pmwiki-users] $EnablePageTitlePriority

ABClf languefrancaise at gmail.com
Wed Feb 2 21:30:57 CST 2011


Hello !

I'm struggling with $EnablePageTitlePriority
Set to 1 in my config php, but has no effect :
page included's title wins and gives its title to host page
(pmwiki 2.2.23)

Can someone confirm
$EnablePageTitlePriority = 1; # First title wins; if a title is
defined in the page, directives from included pages cannot change it.
it's still working as expected without trouble ?

I'm almost sure, (in some cases, see infra), it doesn't work for me ;
but (code extracted from http://www.pmwiki.org/wiki/PITS/00266)

Markup('title','directives',
  '/\\(:title\\s(.*?):\\)/ei',
  "IsEnabled(\$GLOBALS['PCache'][\$pagename]['=p_title'], false)>''?
'': PZZ( PCache(\$pagename,
         \$zz=array('title' => SetProperty(\$pagename, 'title',
PSS('$1')))) )");

does work in any case I guess.

In fact,
$EnablePageTitlePriority = 1; # First title wins;
works or doesn't work *depending the skin being used* (changes are
done with ?setskin=pmwiki) :
using pmwiki default skin, $EnablePageTitlePriority = 1; works as
expected : first title wins
using some other personal skin, $EnablePageTitlePriority = 1; doesn't work.

I did a lot of tests altering that personal template and couldn't see
where the problem is.

What is the difference between the code used for
$EnablePageTitlePriority and the extracted code quoted in my text
Markup('title','directives', (etc) ?
I tried to compare stdmarkup in 2.2.8 / 2.2.9 and didn't understand
anything ; differences are slightly, involving some $tmpkeep and
$tmpwhen variables that don't come back in 2.2.9 stdmarkupfile.

At this time, I'm using the pits code ; next, I will have to redo my
skin, keeping an eye on how included title work.
But I would like to understand, if possible, why can some template
have an effect on $EnablePageTitlePriority.

Thank you,
Gilles.


-- 

---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------



More information about the pmwiki-users mailing list