Hi,
Through the API (Code First) I have made an itemtype containing some itemfields. Now also through the API I want to add one of the built-in activation rules to my itemtype. How is that done? Isn't it possible? If not when will it be?
Hi,
Through the API (Code First) I have made an itemtype containing some itemfields. Now also through the API I want to add one of the built-in activation rules to my itemtype. How is that done? Isn't it possible? If not when will it be?
Currently, you can not do this. We'll take at look at it and get back to you.
Best regards,
Mikkel
Thanks Mikkel. I will lock forward to that. Any idea of when it could be implemented?
Is this already possible to do?
Hi Daniel,
yes with DW8.4 it is possible!
[Item("Article for news", "This item type is used for blah blah blah")] [AreaRule, StructureRule(Dynamicweb.Content.Items.Activation.StructureContextType.Pages, Dynamicweb.Content.Items.Activation.StructureContextType.ItemList), ParentRule(Dynamicweb.Content.Items.Activation.ParentRestrictionRule.ParentType.RootOfWebsite, Dynamicweb.Content.Items.Activation.ParentRestrictionRule.ParentType.RegularPage)] [Category("examples")] [CustomizedURLs] [Icon("/Admin/Images/Ribbon/Icons/scroll2.png", "/Files/Images/1.png")] public class Article : ItemEntry { }
Best regards,
Vladimir
Hi Vladimir,
Thanks for the follow up on this topic. Good to hear that this is possible now!
Best,
Daniel
Hi Vladimir,
Can you add these samples to the tutorials here: http://developer.dynamicweb-cms.com/documentation/for-developers/item-based-structure/getting-started.aspx
This is pretty crucial to get Items working, sinces App-restart wipe all Non-code-first settings made on items.
// Martin
+1
You must be logged in to post in the forum