I have a web page developed in Kentico portal that has a transformation on it.
I need to run some apis to calculate a string value, which I then want to insert into the transformation.
I have written a web part as aspx which runs the api calls and calculates the string value I need and stores it in an <asp:literal> in the aspx file.
I have added this web part to the Kentico portal and to the web page that also contains the transformation.I have also tested that the value is correctly populated by displaying it on the body of the web page, so I know that it is there and it is correct!
How do I reference this string literal and insert the value into my transformation?
Is there a macro that can do this?
Or do I need to store my string value in something else in the aspx web part that will allow me to reference it in the transformation, like a text box?
I would appreciate any help as I am completely new to Kentico but have significant development experience... and I have been looking online for solutions but can't seem to find any.
Thank you in advance!!
If it is just returning a string, does it need to be a web part? Have you looked into creating a custom macro? Here is the documentation.
Transformation is a simple view which iterates through your List of items or a Datasource that you assigned to a Listing webpart(Repeater). So make sure your literal value comes through the datasource and then use the macro to render.
Please, sign in to be able to submit a new answer.