I have a need to create a custom transformation.
I found an article https://docs.kentico.com/display/K8/Adding+custom+methods+to+transformations that explained how to do this. I followed the instructions to the letter and I am not able to call my function from the transformation.
Path to my customfunction = CMSApp_Appcode\Old_App_Code\CMSTransformationMethods\CMSTransformation.cs
I have a public method and here is the signature:
public class CMSTransformation
public int GetBlogLikesCount(int DocumentID)
One thing I took the default namespace because the KB article said to use CMS.Controls and I think because they were showing how to manipulate a textbox control.
It could be as simple as me using the wrong namespace maybe?
Anyway here is my call to the method from my transformation.
<br><span id="newlikes" data-currentuser="<%# BlogFunctions.GetUserName(Eval("NodeOwner")) %>" data-blogposttitle="<%# Eval("DocumentID")%>"><a href="#"><%#GetBlogLikesCount(Eval("DocumentID"))%> Likes</a></span></div>
Here is the complete error:
[TempITemplate.Template]: http://server/CMSVirtualFiles/Transformations/=vg=2819f47b-7d66-4115-91f8-811086a7ed82/IntranetPortal.Transformations/BlogPostDetail_KeepingTrac---showeditdelete-0.ascx(19): error CS0103: The name 'GetBlogLikesCount' does not exist in the current context
Can someone please help me.