2

Is it possible to customize DD4T to read HTML rendered Component Presentations instead of XML? If it is possible, Can you please guide me in doing that without modifying DD4T framework so that later point of time it will be easy to Migrate to new versions of DD4T?

We have requirement to read HTML. We found that if we use ComponentPresentation.DD4T.ContentModel.ComponentPresentation.RenderedContent we can render the HTML Component Presentation which is added part of Page, Component Presentation and other option is use Tridion API and use Query criteria and Component Factory objects we can render dynamic HTML Component Presentations.

Please let me know if any one know other options to Read dynamic HTML Component Presentations.

3

The first question that came to me, if it is already html which ready to be rendered then why do you want to read that using DD4T instead of directly rendering it.

The point of having DD4T is to help with the MVC application implementation. The output from the component presentation is expected to be xml / json which can be easily converted to model by DD4T and can be consumed by your MVC application.

To answer you question, DD4T to read HTML rendered component presentation: it is not possible as DD4T will have to understand HTML to extract data from it and convert it to model.

The recommendation is:

  1. look at the option of how you can change your component presentation to be xml / json.
  2. don't use DD4T on the site, directly render the html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.