Question about Separator transformations.

Vic Carter asked on September 26, 2014 21:39

<%# (Eval("NodeAliasPath").ToString().Contains("Products")) ? "</ul>" : "" %>

Is there a reason why this would not work as a separator transformation? I am getting the following error:

Message: [CMSAbstractTransformation.DataBind]: Object reference not set to an instance of an object.

Using hierarchical transformations to generate a site navigation. I had a specific need to alter the behavior for a particular section. Just trying to clean up some extra HTML on the items that do not need to behave this way and when I tried using the above code for the separator, the error occurred.

Just wondering if there is a specific reason why this would occur, or if my error is elsewhere.

Thank You

Correct Answer

Brenden Kehren answered on September 27, 2014 16:29

A separator transformation does not have any data object set with it so your NodeAliasPath object is empty.

1 votesVote for this answer Unmark Correct answer

Recent Answers

Vic Carter answered on September 29, 2014 17:37

Thanks Brenden, I realized that right after I posted, I should have updated my question. As always I appreciate the feedback.

0 votesVote for this answer Mark as a Correct answer

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