Total newbie with ditto, so I have doc type which has property Related Links its the standard Umbraco Related Link property editor. So in my poco what do i need todo to strongly map,
public [???] PrimaryHeaderLinks {get;set;}
Will this work out of the box or do i need to install Jeavons property converters?
One more thing I have got a service which is in business logic assembly i have some code like:
var globalContent = siteLanguage.Children.FirstOrDefault(x => x.DocumentTypeAlias == "GlobalContent");
return globalContent.As<GlobalContent>();
The first statement returns IPublishedContent when i try second to do the mapping i get cannot resolve As error, am i missing reference or can you not do this?
Related link property
Total newbie with ditto, so I have doc type which has property Related Links its the standard Umbraco Related Link property editor. So in my poco what do i need todo to strongly map,
public [???] PrimaryHeaderLinks {get;set;}
Will this work out of the box or do i need to install Jeavons property converters?
Regards
Ismail
Hi Ismail,
If you're using Jeavon's Property Value Converters library, then all you need to have is this...
Then Ditto will be able to map it.
Cheers,
- Lee
Woot, ta.
One more thing what about archtype properties i guess i would have write my own converterts?
Yeah, it's either...
IPublishedContent
" code ;-)Cheers,
- Lee
Found a quick example of a custom TypeConverter that uses Archetype...
https://gist.github.com/leekelleher/513c48c634fc44729900#file-4-metadatatypeconverter-cs
Cheers lee,
One more thing I have got a service which is in business logic assembly i have some code like:
The first statement returns IPublishedContent when i try second to do the mapping i get cannot resolve As error, am i missing reference or can you not do this?
Regards
Ismail
You should definitely be able to do that.
Check that you have a namespace reference for...
Cheers,
- Lee
Lee,
Done it was me being a learner driver lol
No worries! Good luck with the Ditto mappings :-)
is working on a reply...