Developer forum

Forum » Development » Allowing module attachment to code first items

Allowing module attachment to code first items

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

Im trying to figure out how to allow ModuleAttachment to Code First items?

    [AreaRule,
    StructureRule(StructureContextType.Paragraphs), ParentRule(ParentRestrictionRule.ParentType.RootOfWebsite, ParentRestrictionRule.ParentType.RegularPage),
    TitlePattern("{{Name}}"),
    TitleField("Name")]

 

Regards / Aki


Replies

 
Vladimir
Reply
This post has been marked as an answer

Hi Aki,

Now it is possible by adding:

       RuleAttributeBase(typeof(Dynamicweb.Content.Items.Activation.ModuleAttachmentRestrictionRule), "True"),

And in nearest 8.9.1 hotfix we will add a special attribute for that ModuleAttachmentRuleAttribute, so it will possible to write:

       ModuleAttachmentRule(true),

 

Kind regards,

Vladimir

 

Votes for this answer: 1

 

You must be logged in to post in the forum