Bootstrap Resource Packages in Advantage CSP: Integrating Front-End Frameworks

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

  1. Create new user control save to /Modules/[clientwebsite]/[mymodule]

    sample

    createmodule1.png

  2. Inherit from AdvantageModule and create content

    createmodule2.png

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.

  1. Create a new user control and place in same directory as the module.

    i.e. NewsDialog.ascx

    image2017-10-26_14_17_36.png

  2. Inherit the Dialog control from AdvantageAttributeControl
  3. 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

  1. Go to Advantage Tools > Modules
  2. Click to Add or Edit
  3. Check to Activate
  4. Add a Name for the Module - this is a name without spaces
  5. Add a Display Name - this will show on the Site Manager
  6. Select your Module Category - where you would like to group the Module in the Site Manager
  7. Output Path is where the Module file location is registered - eg: ~/Modules/Common/Banner/Slider.ascx
  8. 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.
  9. 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
  10. If your Module and Dialog has a corresponding Tool, you will need to select the Tool Object here.
  11. If your Tool is a rewrite tool, check this box.
  12. Select the Domains where you want this Module to be available
  13. Select the container sizes you want to be available in Site Manager

 

Register A Module Category

Register A Module Category

 

Advantage Tools > Module Category

  1. To Add or Edit a new module category, go to Advantage Tool > Module Category.
  2. Click to Add or click to Edit; Dan - this isn't working
  3. Enter in the Name, the Sort Order where this will appear in the list, and check to Activate
  4. 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:

  1. Your Zone will be full of Modules
  2. 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

  1. Your Grid List will be full of Objects
  2. You can have a wrapper class and you are able to treat all the items as one entity.
  3. Setting this up may take a little longer to do but could be worth it in the long run
  4. You will have a List of Objects that you can manipulate easily on the page
   

 

Back to Top Button