For a client I'm finally migrating a Tridion 2011 environment to Tridion Site 9.1.
It took my already a lot of time to do the upgrade/install of the Content Manager and the Content Delivery but most of this is finally working. (My experience was stuck on Tridion 2013 so a lot of concepts introduced in Web 8 and Site 9.1 are new for me).
Unfortunately I discovered (to late) that the Content Interaction Library (CIL) cannot be used to render ASCX fragments. And we are using this a lot on the different sites hosted by the Tridion environment.
We have some dynamic component templates with output format "ASCX Webcontrol" this are published to filesystem. We load a list of components with one of this templates on a page.
Our initial code looked like
ComponentPresentationAssembler Assembler = new ComponentPresentationAssembler("tcm of puplication", page); //Page is the aspx page System.Web.UI.Page string content = Assembler.GetContent("tcm of component","tcm of component template");
With the CIL this was always returning empty content. So I have done following changes:
- change the output format to REL
- modify the constructor for the ComponentPresentationAssembler by using
new ComponentPresentationAssembler(publicationID, pageId);
- for testing I have also stored the ascx to database and then they are loaded like for REL
The result of this was that the content was not empty anymore but the tridion:ComponentLink tags are not executed but rendered in the html instead. That was also the reason why in the original project we were storing the ascx files on filesystem.
So I'm looking now to a solution to be able to load more or less this component pressentations in the same way like we did in the past without to many modifications.
Is it for example an option to still publish the ascx files to filesystem and write our own logic to get this directly from file system? If yes what is the best way?
Or is there some trick that I can use to 'execute' the component presentation when the data is coming from database instead?
Thanks for all the help!