Hi Neil, The new line or carriage return within txt_content is probably breaking the format of your rendertag.
http://simplyreddot.blogspot.com/2014/05/rendertag-to-escape-double-quote-and.html Try this instead. <%!! Escape:HtmlEncode(<%txt_body%>).Length !!%> On Monday, June 15, 2015 at 11:12:24 AM UTC-4, Hilmar Bunjes wrote: > > Hi Neil, > if you write this: > > Escape:Text(txt_content).Length > > you get the length of the String "txt_content" which should result in 11 > characters. However, I'm not sure why you get "Less then 10" (which is in > fact "Less than or equal 10"). > > A slightly better solution for this problem could be to not insert the > text placeholder into the page but to grab it from the RenderTag directly. > This way you do not need any Escaping and do not run into problems with > characters in the element that break the RenderTag. You can get an element > of the current page this way (this should print out the length of the > element txt_teaser): > > <%!! Context:CurrentPage.GetElementByName(txt_teaser).Value.Length !!%> > > If you are using an element transfered via list/dyn anchor you need to get > the page first and then the element (the inf_... is an info element to get > the guid of the page which is iterated in the list): > > <%!! Context:Pages.GetPage(Guid:<%inf_PageGUID%>).GetElementByName... !!%> > > Best, > Hilmar > > -- > www.smartapi.de - RedDot RQL via .NET - object-oriented, well-tested and > open source > > Am Montag, 15. Juni 2015 10:42:02 UTC+2 schrieb Neil: >> >> Hi all, thanks for the replies (including those off-list). >> >> This is 11.2 Build 11.2.2.844 (11.2 SP2 HF6). >> >> I got an off-list suggestion to change '...(<%txt_content%>)...' to just >> '...(txt_content)...', which got the comparison to at least render the >> output message. >> >> It returned 'Less than 10' as the message, despite being over 2,000 >> chars, so something still not right: >> >> <if> >> <query valuea="Escape:Text(txt_content).Length" operator=">" >> valueb="Int:10"> >> <htmltext>------ Over 10 ------</htmltext> >> </query> >> <query type="else"> >> <htmltext>------ Less than 10 ------</htmltext> >> </query> >> </if> >> >> >> -- You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to reddot-cms-users+unsubscr...@googlegroups.com. To post to this group, send email to reddot-cms-users@googlegroups.com. Visit this group at http://groups.google.com/group/reddot-cms-users. For more options, visit https://groups.google.com/d/optout.