Render property with Dynamic Content

Vote:
 

Hi,

Is there any function that renders a property with Dynamic Content from a ContentData to e.g. a string? I've tried the GetPropertyValue() extension without any luck.

#65026
Jan 17, 2013 18:50
Vote:
 

Bump! How do we render properties in code!?

#65479
Jan 30, 2013 16:16
Vote:
 

If you call

xhtmlString.ToHtmlString(); 

it should give you the html output of the xhtmlstring (including dynamic content).

#65488
Jan 30, 2013 16:55
Vote:
 

Ok, thanks. But there is no common way to render all type of properties?

#65489
Jan 30, 2013 16:56
Vote:
 

In CMS7 we have separated rendering from data. So a given data migth be rendered in different ways depending on context (MVC, WebFomrs, UI hints, DisplayChannels etc). 

And if you run MVC it is also conventions that comes to play when MVC chooses a template for a data instance (e.g. a property)

In your case are you using MVC or WebForms? And in which context are you doing the rendering (are you execution on a webform page/ Mvc View)?

#65492
Jan 30, 2013 17:15
Vote:
 

Hi and thanks.

We're using webforms. How are UI hints considered when rendering a property within webforms? I know that tags are considered when rendering a content area with blocks and so on, but how does UI hints fits in here?

If we're not passing in any principal to ToHtmlString(), does it take the current principal?

#65888
Feb 13, 2013 13:44
Vote:
 

By the way,

((XhtmlString)innerProperty.Value).ToHtmlString();

doesn't render the dynamic content.

#65891
Feb 13, 2013 14:26
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.