Portal Engine
Version 3.x > Portal Engine > Complete Page HTML via CMS.PortalControls Class View modes: 
User avatar
Member
Member
Paul - 1/26/2009 6:10:44 AM
   
Complete Page HTML via CMS.PortalControls Class
How do I get the complete HTML from a CMS created page via the CMS.PortalControls class?

I have created a page, that I would like to retrieve the content of and manipulate. I was wondering if there is a function that, having passed in a parameter (such as the DocumentID) would return the HTML of that page?

Many thanks,
Paul.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 1/27/2009 3:47:41 AM
   
RE:Complete Page HTML via CMS.PortalControls Class
Hi Paul,

You will have to write your own code, as it is in general not related to KenticoCMS...
Inspiration could be found in this article:

http://imak47.wordpress.com/2008/07/08/how-to-render-a-pages-html/

If you use Portal engine, you would add your code into CMSPages/PortalTemplate.aspx,
If using ASPX templates, you would add your code into the appropriate template.

Kind regards,
Zdenek Cetkovsky, Kentico.

User avatar
Member
Member
yasser - 2/1/2009 12:02:29 PM
   
RE:Complete Page HTML via CMS.PortalControls Class
I'm not sure you understand.

I have created a page in Kentico CMS and I can see it in the database.

There must be a function in the CMS class that will return the content of that page as if it were run-time, returning HTML for a browser to use (incorperating templates etc.)

Regards,
Paul

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/3/2009 4:47:58 AM
   
RE:Complete Page HTML via CMS.PortalControls Class
Hi,

you need to download and save the rendered page. There is not a one method which is rendering the HTML. The output code is put together from set of controls and methods according to the document.

Best Regards,
Juraj Ondrus