On Sat, 28 Jan 2017, Petko Yotov wrote:
But it is still possible to change it so that the include markup is not
disabled, by adding to config.php such a block:
function EnableIncludeOnSave() {
global $SaveAttrPatterns;
unset($SaveAttrPatterns['/\\(:(if\\d*|include|redirect)(\\s.*?)?:\\)/i']);
$SaveAttrPatterns['/\\(:(if\\d*|redirect)(\\s.*?)?:\\)/i'] = ' ';
}
$PostConfig['EnableIncludeOnSave'] = 200;
This will still disable the "if" and "redirect" markups; you shouldn't
re-enable "redirect" otherwise saving a page with such a markup will redirect
the browser to the target before the page is saved.
After adding this code block, you still need to edit and save every page in
order to place its title in the "page attribute". Also, if you change the
"included" pages that change the title, browsing the "including" page will
show the new title but you'll still need to edit and save it in order for the
page attribute, and the plus-links, to be updated.
Another solution I came up with was setting the title in the page with the
include statement like this:
(:title {Group.PageThatIsIncluded$Title}:)
but that has the same drawback that the "including" page will have to be
re-saved each time the title is updated.
Maybe this recipe would work:
http://www.pmwiki.org/wiki/Cookbook/PTVLinkText
but I don't know yet how it will work with include...
-Johan Bengtsson
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users