Item9873: TMPL:P cannot be split over more than one line
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
our docco (in
SkinTemplates) says in the
ConditionalExpansion example:
%TMPL:DEF{"link_inactive"}%<input type="button" disabled value="Link>%TMPL:END%
%TMPL:DEF{"link_active"}%<input type="button" onclick="link()" value="Link" />%TMPL:END%
%TMPL:P{
context="inactive"
then="link_inactive"
else="link_active"
}% for %CONTEXT%
however in trunk today, this does not work.
I'd rather that it did, but if not, we need to fix the docco.
this may well be an issue for 1.1.1 too
--
SvenDowideit - 24 Oct 2010
The documentation was updated to be wrong as part of the large documentation beautifying that was done.
So reverting the docu back in 1.1.1 is for sure the safe thing to do short term.
But for later releases, yes why not support multiline? All macros should work multiline eventually.
--
KennethLavrsen - 24 Oct 2010
I checked in the docu update and lower this one to enhancement.
Even with the documentation showing a single line we can fix the code to support multiline later. I will not write that it has to be single line.
--
KennethLavrsen - 24 Oct 2010
TMPL:P can be split over more than one line ... with the difference that a multiline TMPL:P is exectuted as normal macro
whereas a one-line TMPL:P is precompiled and expanded as part of the template stage.
I am using this feature every day.
--
MichaelDaum - 26 Oct 2010
I was working on
WikiDrawPlugin, and used a multi-line TMPL:P that was accessed from either a topic template, or via Func in the plugin (i'll look later to make sure which) and it didn't work - so maybe it should say 'doesn't work consistently'
--
SvenDowideit - 26 Oct 2010
Well. The documentation now does not say one or the other. It just shows examples on one line.
So it is up to anyone to enhance the code to TMPL:P works multiline.
--
KennethLavrsen - 26 Oct 2010