Writing a Boolean Transformation

Kayla Johnson asked on August 26, 2014 20:45

I want to use the IsCurrentDocument() transformation in a universal viewer. If it's not the current document, display the transformation. Like so:

<%# if(!IsCurrentDocument()) %>

<%# GetEditableValue("Slideshow") %>

<%# Eval("DocumentName",true) %>

<%# LimitLength(GetEditableValue("IntroText"), 50 , "", true) %>

<%# End If %>

Obviously this isn't right. But I don't know ASP hardly at all and there are no examples of how to do this.

I guess this is a two-part question. I have this in a universal viewer like I mentioned. And there is an option to display the viewer only on certain document Types. But is there a way to display it on certain documents only. Because I have it on a template that multiple pages share but Only need it on a few.

Recent Answers

Charles Matvchuk answered on August 27, 2014 05:31 (last edited on December 10, 2019 02:30)

Kayla, I am not sure what your are asking. You can use the visibility property and resolve to true. I actually check for class name as below in one of my examples. The other way would be to filter out or in, via the Where condition and use a LIKE statement.

{% if (CurrentDocument.ClassName == "YOUR.CLASSNAMEHERE") {true} |(identity)GlobalAdministrator%}

If I am missing something please elaborate.

0 votesVote for this answer Mark as a Correct answer

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