[pmwiki-devel] Section behavious in .tmpl files
V.Krishn
vkrishn4 at gmail.com
Sun Apr 20 02:14:14 CDT 2014
> 1.
> If I try the following in skin.tmpl:
>
> <!--PageTestFmt-->
> <div class="test">
> <!--PageText-->
> </div>
> <!--/PageTestFmt-->
>
> and set in config file,
> SetTmplDisplay('PageTestFmt', 0);
>
> I notice value of <!--PageText--> is still displayed,
> while div wrap class="test" is not.
>
> Hope this is expected behaviour and likely not change ?
> (tested in v2.2.58)
hmm..
forget that <!--PageText--> becomes a section start and
nesting is not allowed. So one needs to do both for valid output.
SetTmplDisplay('PageEmptyFmt', 0);
SetTmplDisplay('PageText', 0);
Do correct me if wrong.
2.
Another query, for a custom ?action=test,
can I do something like
a.
....
$FmtV['$PageText'] = 'some text';
$FmtV['$OtherText'] = 'other text';
SDV($HandleBrowseFmt, array(&$PageStartFmt, &$PageRedirectFmt, '$PageText',
'$OtherText', &$PageEndFmt));
PrintFmt($pagename, $HandleBrowseFmt);
....
b. and in .tmpl file
....
<div class='text' >
<!--PageText-->
</div>
<div class='text' >
<!--OtherText-->
</div>
....
?
Tying create a skin for async/ajax calls (qnote).
Usually for a given custom ?action=
calling print($var) and then exit() would suffice,
but wanted use features in skin like sections. etc and
see if the skin can be used by other async apps generally.
Thanks.
--
Regards.
V.Krishn
More information about the pmwiki-devel
mailing list