Trying to do this with no luck
<%# Eval("NodeAliasPath").ToString().Split("/")[1] %>
i'm in version 8
char uses single quotes...
<%# Eval("NodeAliasPath").ToString().Split('/')[1] %>
I use that in a macro without issue, never tried in a transformation. Any errors in your event log? Maybe try:
<%# EvalText("NodeAliasPath").... %>
Here's my macro syntax:
{% "/" + CurrentDocument.NodeAliasPath.Split("/")[1] + "/Mobile.aspx" @%}
This is the error. I could have sworn I had done this before in previous version.
Message: [TempITemplate.Template]: http://server/CMSVirtualFiles/Transformations/=vg=3ee37a0b-9fc9-41fa-bbcc-119ec482e8d2/CMS.BookingEvent/CalendarEvent.ascx(2): error CS1502: The best overloaded method match for 'string.Split(params char[])' has some invalid arguments
That was it. Thanks!
Ahh yes the char vs. string. Geez technicalities!
Please, sign in to be able to submit a new answer.