Developer forum

Forum » Development » Custom description on ItemEntry using Code First

Custom description on ItemEntry using Code First

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

 

How do you provide a custom description (and name) for an ItemEntry when using Code First? Is there an attribute I need to apply to the class? I tried a few but none seemed to work.

 

Or do you have to go into Management Center and set the name and description there?

Imar

 


Replies

 
Morten Bengtson
Reply

You can set the name by using ItemAttribute, like this...

[Item("My friendly item type name")]
public class MyItem : ItemEntry
{
...
}

 

I don't think that there is any way to specify the description :/

 

It would also be great if we could specify both a system name and a display name for the field groups. Right now we can only use the GroupAttribute to specify the display name which is then transformed into a system name for use in e.g. template tags. This makes the system name unpredictable.

 
Lars Larsen
Reply

I am looking for the opportunity to set a custom description for an ItemEntry too. Does anyone know if it's possible now?

 
Vladimir
Reply
This post has been marked as an answer

Hi Lars,

yes, it is possible now :)

[Item("My friendly item type name", "My description")]
public class MyItem : ItemEntry
{
...
}
 
 

Kind regards,

Vladimir

Votes for this answer: 1
 
Lars Larsen
Reply

cool thanks smiley

 

You must be logged in to post in the forum