Overview Managing Modules Overview API Reference (AdvantageModule) API Reference (AdvantageModuleRewrite) An AdvantageModule is a front end display user control that is rendered on the front end of the website. AdvantageRewrite module is an extension, that is assigned to a specific BusinessObject and will perform an automatic friendly URL rewrite. AdvantageModules make make use of the API that is inherited (ModuleEngine). This allows the developer to request structured data from the system, and filter results. (please see all API methods available for AdvantageModuleEngine) An AdvantageModule may also have an associated dialog control (AdvantageAttributeControl). This allows the developer to make custom options available to the CMS Administrator at runtime. Create AdvantageModule Create AdvantageModule Steps to create a simple AdvantageModule Create new user control save to /Modules/[clientwebsite]/[mymodule] sample Inherit from AdvantageModule and create content Create AdvantageModuleRewrite Create AdvantageModuleRewrite API Reference AdvantageModuleRewrite are front-end display modules that are automatically bound to a specific BusinessObject. The main additional Properties: public abstract bool IsReWrite { get; } Returns true if this module has been rewritten by the URL public T MyObject { get; set; } Returns the filled object based on the rewritten URL. Returns null if the module is not rewritten. AdvantageModuleDialog AdvantageModuleDialog For Modules that require configuration from the backend at runtime the developer can accomplish this by adding a ModuleDialog user control. The user control inherits from the AdvantageAttributeControl. Create a new user control and place in same directory as the module. i.e. NewsDialog.ascx Inherit the Dialog control from AdvantageAttributeControl The UserControl will have an "Attributes" property of type AdvantageAttributes. This can hold a list of data that can be retrieved on the front end. The sample below, allows the front end to retrieve News Articles based on a category. NewsDialog.ascx.cs NewsDialog.ascx Register A Module Register A Module Advantage Tools > Module Go to Advantage Tools > Modules Click to Add or Edit Check to Activate Add a Name for the Module - this is a name without spaces Add a Display Name - this will show on the Site Manager Select your Module Category - where you would like to group the Module in the Site Manager Output Path is where the Module file location is registered - eg: ~/Modules/Common/Banner/Slider.ascx Mobile Output path can be blank and it will use the Output Path above in 2.5. If you add this, it will use this Module on Mobile, 767px viewport and less. Form path is the location of your Dialog. The dialog will capture the data for output on the Module. - eg: ~/Modules/Common/Banner/SliderDialog.ascx If your Module and Dialog has a corresponding Tool, you will need to select the Tool Object here. If your Tool is a rewrite tool, check this box. Select the Domains where you want this Module to be available Select the container sizes you want to be available in Site Manager Register A Module Category Register A Module Category Advantage Tools > Module Category To Add or Edit a new module category, go to Advantage Tool > Module Category. Click to Add or click to Edit; Dan - this isn't working Enter in the Name, the Sort Order where this will appear in the list, and check to Activate Click Save to complete Multiple Modules Vs. Module With A Grid List Multiple Modules Vs. Module With A Grid List There are some choices to make when deciding how to gather content from the CMS. How big is the content piece? How able is the user? What output functionality do we need? If you choose to capture content in a module and your content is a repeatable pattern, you might also need to make this decision - should I use multiple modules or one module with a grid list that holds multiple object items? Here's an example: a Content Tile usually consists of a Heading, Paragraph, Image, and Link. This can easily be converted into a Snippet but may be too complicated for the Client, so let's decide to use fields instead. Now we know that we are going to have 4 tiles across and as many as they want on the page. We can either implement these as one module, that you add many times to the page, or you can create a grid list within the module. They are mostly the same although have a few small differences: Multiple Modules: Your Zone will be full of Modules You won't be able to have a wrapper class for all of these modules as they are treated as individuals. This is difficult if you want to use equal height for a tile as you need a wrapping class. (You could use a fixed height if you need this solution) Grid List within a Module Your Grid List will be full of Objects You can have a wrapper class and you are able to treat all the items as one entity. Setting this up may take a little longer to do but could be worth it in the long run You will have a List of Objects that you can manipulate easily on the page