Is there some kind of escaping? Transformation outputting string literals

Tom F asked on January 6, 2017 02:15

Hi All, I have the following transformation

transformationToRender = (Cache(Documents[NodeAliasPath].Parent.LightBoxLayout, 5, true, "Parent|" + NodeAliasPath, GetCacheDependency("nodes|<site name>|<page type code name>|all")) ? "CMS.ImageDescription.LightBoxImageDescription" : "CMS.ImageDescription.NestedImageDescription2Col");

{% Object.ApplyTransformation(transformationToRender, "ContentBefore", "ContentAfter") #%}

When the transformation is rendered to screen it spits out anything in strings ""


ContentBefore ContentAfter and the result of the if statement as well as outputting the expected transformation.

Is there some kind of special escaping required to make this work without outputting the string literals?

Correct Answer

Jeroen Fürst answered on January 9, 2017 17:20

Hi Tom, if you add return; then this will prevent the string from being outputted. Cheers!

1 votesVote for this answer Unmark Correct answer

Recent Answers

Roman Hutnyk answered on January 6, 2017 09:03

Have you checked if transformationToRender contains value you need?

Are CMS.ImageDescription.LightBoxImageDescription and CMS.ImageDescription.NestedImageDescription2Col of Text/XML type?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.