I have a custom menu (Bootstrap) that I've setup transformations for. All works great, except when you want a page to redirect elsewhere. This is the current link:
<a href="{% Transformation.GetDocumentUrl() #%}" title="{%DocumentName%}">{%DocumentName%}</a>
However, if you change the Navigation > Menu Actions property to "URL Redirect" the above does not take this into account. What Transformation method should I be using instead of GetDocumentUrl()?
Hello,
I would use something like this:
<a href="{% DocumentMenuRedirectUrl.ToString()==""?Transformation.GetDocumentUrl():DocumentMenuRedirectUrl |(identity)GlobalAdministrator%}</a>
Best regards, Jan Hermann
Thanks @Jan. This works great...can you tell me where in the documentation (docs.kentico.com) this key is documented: "DocumentMenuRedirectUrl"? I was not able to find it via a search and I looked here where I assumed it would be document, but is not: https://docs.kentico.com/display/K81/Reference+-+Transformation+methods#Reference-Transformationmethods-URLsandpagelinks.
This is standard macro property you can find in the macro console:
System -> Macros -> Console -> CurrentDocument
Please, sign in to be able to submit a new answer.