I think it will be useful for many!
The file -
''/inc/common.php'', the line ~ 1108:
$tpl = str_replace(
array(
'@ID@',
'@NS@',
'@FILE@',
'@!FILE@',
'@!FILE!@',
'@PAGE@',
'@!PAGE@',
'@!!PAGE@',
'@!PAGE!@',
'@USER@',
'@NAME@',
'@MAIL@',
'@DATE@',
'@TITLE@', // <-- ADD THIS
),
array(
$id,
getNS($id),
$file,
utf8_ucfirst($file),
utf8_strtoupper($file),
$page,
utf8_ucfirst($page),
utf8_ucwords($page),
utf8_strtoupper($page),
$INPUT->server->str('REMOTE_USER'),
$USERINFO['name'],
$USERINFO['mail'],
$conf['dformat'],
p_get_first_heading(getNS($id)), // <-- ADD THIS
), $tpl
);
This will allow to realize the following feature:
Create the template
''/data/pages/perl/__template.txt'' ("perl" - just for example):
====== @TITLE@. @!PAGE@ ======
<file perl>
</file>
\\
Back to [[:@NS@|@TITLE@]]
The page
''data/pages/perl.txt''[/m] has a [m]<h1>[/m]-title as "Perl Notes" ([m]====== Perl Notes ======).
If we will create new page
'':perl/test2'' we will get the name of the parent page in the child page:
====== Perl Notes. Test2 ======
<file perl>
</file>
\\
Back to [[:perl|Perl Notes]]
Thanks!