Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Need some guidance on how to call
Umbraco.RenderTemplate(pageId).ToString();
to get the full rendered HTML of the page
inside a Event Handler like;
ContentService.Published += ContentServicePublished; .. private void ContentServicePublished(IPublishingStrategy sender, PublishEventArgs
It gives:
The type or namespace name 'RenderTemplate' does not exist in the namespace 'Umbraco'
Hi Keilo
Inside your event you do not have access to the UmbracoHelper methods via
Umbraco.
(UmbracoHelper methods contain RenderTemplate etc)
You should be able to do the following, to construct an UmbracoHelper instance
UmbracoHelper umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
and then be able to write
var fullHTML = umbracoHelper.RenderTemplate(pageId).ToString();
if that helps ?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Calling RenderTemplate in Save Event Handler
Need some guidance on how to call
to get the full rendered HTML of the page
inside a Event Handler like;
It gives:
The type or namespace name 'RenderTemplate' does not exist in the namespace 'Umbraco'
Hi Keilo
Inside your event you do not have access to the UmbracoHelper methods via
(UmbracoHelper methods contain RenderTemplate etc)
You should be able to do the following, to construct an UmbracoHelper instance
and then be able to write
if that helps ?
is working on a reply...