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
I was thinking something along the lines of:
public IPublishedProperty Body { get; set; }
But alas! ;-) Is it possible? Or best to handle directly in the view?
Hi Lau,
If no processor attribute is set on a POCO property, then Ditto will default to using the UmbracoProperty processor. This makes a call to Umbraco's GetPropertyValue("alias") ... so it returns the property's value, not the IPublishedProperty.
UmbracoProperty
GetPropertyValue("alias")
IPublishedProperty
If you want the IPublishedProperty, then you'd need to write your own custom processor. Pretty much copying UmbracoPropertyAttribute.cs but changing line #236 to content.GetProperty(...).
UmbracoPropertyAttribute.cs
content.GetProperty(...)
Hope that makes sense?
Otherwise, you could change your Body's type to JObject (or a general object)?
Body
JObject
object
Cheers, - Lee
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Ditto and The Grid
I was thinking something along the lines of:
But alas! ;-) Is it possible? Or best to handle directly in the view?
Hi Lau,
If no processor attribute is set on a POCO property, then Ditto will default to using the
UmbracoProperty
processor. This makes a call to Umbraco'sGetPropertyValue("alias")
... so it returns the property's value, not theIPublishedProperty
.If you want the
IPublishedProperty
, then you'd need to write your own custom processor. Pretty much copyingUmbracoPropertyAttribute.cs
but changing line #236 tocontent.GetProperty(...)
.Hope that makes sense?
Otherwise, you could change your
Body
's type toJObject
(or a generalobject
)?Cheers,
- Lee
is working on a reply...