Developer forum

Forum » Development » Where can I find documentation for AreaRuleAttribute?

Where can I find documentation for AreaRuleAttribute?

Sten Hougaard
Reply

Hi,

I am trying to build items through C#. I want my item to be creatable in any area and I want it to be possible to create it as an Page.

The documentation however seems to be not up to date, like here:

http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.Content.Items.Annotations_namespace.html

I have in my code found: Dynamicweb.Content.Items.Annotations.AreaRuleAttribute, however in the above official Dynamicweb 8 documentation I cannot find it...

Please can you help me?


Med venlig hilsen/Best regards,

Sten Hougaard
Webudvikler

E: sho@1stweb.dk
M: 29850818
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964


Replies

 
Morten Bengtson
Reply

Here are some examples that might help...

AreaRule

  • [AreaRule] - Allow items of this type to be created in any area / website
  • [AreaRule(2,3)] - Allow items of this type to be created only on an area with id 2 or 3

StructureRule

  • [StructureRule(StructureContextType.Pages)] - Allow items of this type to be created as pages only.

ParentRule

  • [ParentRule(ParentRestrictionRule.ParentType.RootOfWebsite, ParentRestrictionRule.ParentType.RegularPage)] - Allow items of this type to be created in the root of the website and under a regular page.

ChildRule

  • [ChildRule(true)] - Allow regular pages to be created under items of this type.

 

You must be logged in to post in the forum