You are here: Foswiki>Tasks Web>Item9873 (12 Mar 2011, GeorgeClark)Edit Attach

Item9873: TMPL:P cannot be split over more than one line

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: GeorgeClark
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
 

ItemTemplate edit

Summary TMPL:P cannot be split over more than one line
ReportedBy SvenDowideit
Codebase 1.1.0, trunk
SVN Range
AppliesTo Engine
Component
Priority Enhancement
CurrentState Confirmed
WaitingFor
Checkins distro:fbb9380bb0d2
TargetRelease n/a
ReleasedIn n/a
Topic revision: r10 - 12 Mar 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy