Grouping Arena Module Settings

Tuesday, September 27, 2011 4:26 PM by nairdo

Something I've been meaning to have added to the Arena Custom Module Developer (ACMD) guide is this little known feature that was introduced at some point in the past few years.  It's a way to group your custom module's settings as seen here:

Grouping Arena Module Settings 

The effect is subtle, but when you have 20 or so settings like we have in our check-in module it starts to become really necessary (of course we haven't yet added groupings, but we will in the next release).

To create these groupings (aka categories) all you need to do is include the System.ComponentModel in your using section:

using System.ComponentModel;

 ... and then define a Category attribute with a grouping name argument for each module setting as seen in this example:

// Styling Group
[TextSetting( "Search Button Image Path", "Relative path ...", false ), Category( "Styling" )]
public string SearchImagePathSetting { get { return Setting( "SearchImagePath", "", false ); } }

[TextSetting( "Search Button CSS Class", "CSS classname...", false ), Category( "Styling" )]
public string SearchButtonCSSClassSetting { get { return Setting( "SearchButtonCSSClass", "", false ); } }

[TextSetting( "TextBox CSS Class", "CSS classname ...", false ), Category( "Styling" )]
public string TextBoxCSSClassSetting { get { return Setting( "TextBoxCSSClass", "", false ); } }

// No group defined -- these go into a "General Settings" section automatically
[NumericSetting( "Return Results Page Size", "The number of ...", false )]
public string ReturnResultsPageSizeSetting { get { return Setting( "ReturnResultsPageSize", "10", false ); } }


    No Comments

New Comments to this post are disabled

Powered by Community Server, by Telligent Systems