Try our conversational search powered by Generative AI!

Does the SDK expose the HTML output of a page?

Vote:
 

Is it possible to retrieve the HTML of a page overall, rather than just its properties? How is it done?

 

Cheers!

#45794
Nov 17, 2010 17:24
Vote:
 

I'm not following what you want here.  "the HTML of a page overall" would be the result of the Page object (with the properties) and a rendering template (an aspx file). So, you want to get the HTML rendering from this marriage, is that correct?

If so, EPiServer wouldn't expose anything for it, but you could get it from two other places: a custom Response Filter, or a Page Adapter.  Either of these would present you with the entire HTML of a single request for you to manipulate before sending back to the client or for whatever other reason.

However, both those options assume that someone has requested a page -- they would fire at the end of a page execution.  If you just want to grab the HTML on your own, you'd need to make your own HTTP request for the page.

Did I come close to what you wanted?  Tell me which option sounds best, and I can give you some code for that specific situation.

#45796
Nov 17, 2010 19:00
Vote:
 

Thanks for your reply, Deane. Yes you have followed correctly. 

I do see your point and realise that what I am actually after is the HTML output of a rich text editor that includes dynamic content. 

Hopefully that's a bit easier?

#46064
Edited, Nov 25, 2010 16:27
Vote:
 

To expand:

If I do page[fieldName].ToString(), the output includes the text but only shows

"{DynamicContent:Johnson Box}"

where the output of the dynamic content should be.

 

edit: bad layout

#46073
Edited, Nov 25, 2010 16:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.