Developer forum

Forum » CMS - Standard features » Code first item color property sample

Code first item color property sample

Peter Leleulya
Reply

Can anyone provide me with a code first item color property sample? Preforably with the presets parameter ...

I'm trying to figure out how this shoud work using Terkildsen's blog but can't find how this should work.

There are very little samples on how to work with code first items.
I have plenty more questions, but a sample page for all item options would be nice.

Thanks in advance!

http://pterkildsen.com/2015/03/22/code-first-items-in-dynamicweb-cms/
http://developer.dynamicweb.com/releases/older-releases/dynamicweb-8-4-1.aspx --> Default colors for the color editor in items


Replies

 
Vladimir
Reply
This post has been marked as an answer

Hi Peter,

it seems we missed Preset property, I added it to next 8..6.1 hotfix, so you will be able to write:

        [Color("Background color", Presets="#FFAAFF,#AAFFFF,#FFFFAA")]
        [DefaultValue("#AAAAAA")]     
        public string BackgroundColor { get; set; }

Best regards,

Vladimir

Votes for this answer: 1
 
Peter Leleulya
Reply

Thnx Vladimir

 

You must be logged in to post in the forum