[pmwiki-users] PmWiki 2.2.10 released
Petko Yotov
5ko at 5ko.fr
Tue Jan 19 11:45:44 CST 2010
On Monday 18 January 2010 21:59:07, Dominique Faure wrote :
> On Mon, Jan 18, 2010 at 09:34, Oliver Betz <list_ob at gmx.net> wrote:
> > Petko Yotov wrote:
> >>* If set to 1, the first title directive will be used, and if a page
> >> defines a title, directives from included pages cannot override it.
> >
> > Sadly a title in EditQuickReference still clobbers the title of the
> > edited page (well, we don't really _need_ to set a title in
> > EditQuickReference).
>
> I didn't had a look at the code, but it would be great to have some
> kind of markup directive which could temporary prevent title
> propagation (by setting $EnablePageTitlePriority to 1).
It will not be easy. When the markup is being processed, all markup rules are
already defined. Then the two "modes" of the title are processed differently.
The old one is processed with other directives, after all included sections
have been brought into the page -- this is how it worked, we don't want to
change it for people who need it.
The new one is processed before the inclusion of other sections, so that the
real page have the priority for setting the title. If the page doesn't set a
title, the first included section containing (:title:) will set it.
It is possible to change the markup rules, or to set a switch for a function
to accept or not a subsequent (:title:) directive, but it is not possible to
change the "when" part ("directives" or "<include") for an existing markup, so
this will be a mess.
When we edit a page, PmWiki knows it is on PageName, but the markup it renders
comes from Site.EditForm.
* If there is no (:title:) directives in EditForm or in the inclided pages
like EditQuickReference, the page will show the title from the
$page['title'] attribute like it should.
* If there is a (:title:) directive in EditForm or in the pages it includes,
this overrides the $page['title'] attribute and appears as title.
So, we could possibly fix this by ignoring the (:title:) directives when
Site.EditForm is rendered for editing, but I'm not sure if this wouldn't
interfere with the "Save and Edit" function and even with the normal "Save"
for the correct setting of the $page['title'] attribute.
Petko
More information about the pmwiki-users
mailing list