Kentico 12 - change transformation GetAttachmentUrl

WebAdmin ČÚZK asked on August 23, 2022 14:41

In Kentico 10, I have tranformation, which works: ##editbuttons##<%# Eval("BudgetYear") %> <a href="<%# GetAttachmentUrl("BudgetAtachement", "BudgetID") %>" title="<%# Eval("BudgetNazevRSS") %> ke stažení ve formátu PDF">Stáhnout

In Kentico 12 it does not work. I have to change parameter BudetID for NodeAliasPath, but I do not know where I have to find it? Can someone help me? Thnaks Jakub Havlicek

Recent Answers


Juraj Ondrus answered on August 24, 2022 07:30

Please, see the API changes documentation. Or, refer to Kentico 12 documentation on transformation methods. I would try using e.g. <%# GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath")) %>

1 votesVote for this answer Mark as a Correct answer

WebAdmin ČÚZK answered on September 19, 2022 06:45

Thanks for the response, but I still don't know where to find the NodeAliasPath. For the given type of document, I only have the name, attachment and a few other additional attributes defined, but not NodeAliasPath, and if I write to transformation only 'NodeAplisPath', the attachment from live page a preview is still unavailable.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 19, 2022 07:08

The NodeAliasPath is a system field/column and is defined for each node in the tree. Just check the CMS_Tree DB table. In your repeater you may need to add this column into the list of columns, so this value is returned from the DB by the repeater. Then, the Eval("NodeAliasPath") will return the desired value.

0 votesVote for this answer Mark as a Correct answer

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