You are here: Foswiki>Tasks Web>Item10595 (15 Apr 2011, MichaelDaum)Edit Attach

Item10595: Prepare template for emptied items

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: MetaCommentPlugin
Branches:
Reported By: ArthurClemens
Waiting For:
Last Change By: MichaelDaum
In metacomments.tmpl the TMPL:Ps are surrounded by newlines, for example:

    %TMPL:P{
      "comment::photo" 
      web="%USERSWEB%" 
      topic="$author"
    }%
    %IF{"'%ENCODE{"$title" type="entity"}%'!=''" then="<h3>%ENCODE{"$title" type="entity"}%</h3>"}%<!-- -->

Now if comment::photo is emptied with
%TMPL:DEF{"comment::photo"}%%TMPL:END%

a standalone newline is created, resulting in an empty paragraph. Better to concatenate:

    %TMPL:P{
      "comment::photo" 
      web="%USERSWEB%" 
      topic="$author"
    }%%IF{"'%ENCODE{"$title" type="entity"}%'!=''" then="<h3>%ENCODE{"$title" type="entity"}%</h3>"}%<!-- -->

-- ArthurClemens - 04 Apr 2011

Fix released in 0.91.

-- MichaelDaum - 15 Apr 2011

ItemTemplate edit

Summary Prepare template for emptied items
ReportedBy ArthurClemens
Codebase
SVN Range
AppliesTo Extension
Component MetaCommentPlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins MetaCommentPlugin:76d3d299105f
TargetRelease n/a
ReleasedIn n/a
Topic revision: r2 - 15 Apr 2011, MichaelDaum
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