Blocks

A block is a reusable section of HTML that can be placed in various sections of your site. it can be a simple static block of script or text that is self contained, or it can be dynamically generated by using content from a group and formatted using the mustache/handlebars templating language.

Once a block has been created, it can be placed in editorials, pages, and templates by using the <block> HTML tag, which will automatically be replaced with the content of the block wherever it is seen.
eg. <block name="BlockUniqueKey" />

Dynamic blocks adhere to the rule of the content they render. If a block is tied to a particular category and the underlying category is deactivated or the items contained within are removed or deativated, they will automatically disappear from the block. If you want to continue to show the block, but alter its display, you can use the mustache/handlebars rules to craft different displays based on the presence or absence of dynamic content.

Attributes

The content block contains all of the elements that are required to identify and render the content. These attributes are as follows:

Property Description
Unique Key This is the key that will be used to identify this block when you place it in your various content sections. It should conform the HTML standards of name attriutes, avoiding spaces and other special characters that may cause a browser to not render it properly.
Cache (minutes) Some blocks can be created with a great deal of data, that doesn't change frequently. To aid in performance, a cache value can be set to limit the frequency that the site needs to look up and re-render the dynamic data. A value tells marketAgility that the data is voloatile and should never be cached. A positive value indicates that the data should be refreshed every "n" number of minutes.
End Date This is the date and time that the block should start to appear.
Start Date This is the date and time that the block should disappear.
Title A friendly name for the block
Module Blocks can have their own custom layout or inherit from a block template called a "Module". This field lets the block know where it should find its layout.
Result Limit For dynamic content, this allows you to control th number of elements that should be drawn when pulling from a category. A value of zero means to pull and render all active items in the target category
Block Type This indicates the type of block.
  • Static Block - Simple HTML text that does not tie to any dynamic content.
  • Subcategory Block - A list of subcategories to the targeted category.
  • Product Group - A list products in the targeted product group.
  • Advertisemnt Group - A list products in the targeted advertisement gruop.
  • Page Group - A list pages in the targeted page group.
  • Editorial Group - A list pages in the targeted editorial group.
  • Store Group - A list pages in the targeted store group.
  • Career Group - A list pages in the targeted career group.
Content Source For dynamic content, this indicates the fully qualified content group that will provide the source of data for the template. To change the target group, click the box to open the category chooser

Searching for Blocks

To find a block or group of block, a search block has been provided.

The Name field allows you to filter your results to only contain blocks that share the characters entered in their name. The Active-only option filters your result to only show currently acvtive produdcts.

Searching for a block

Browsing Block Categories

If you wish to work with all of the blocks in a particular category, you can switch to the browse tab. This will give you an interactive product category navigation tool to locate the category you are looking for. Use the arrows to expand subcategories. Once you have found the desired category, click the name to see the blocks assigned to that category.

To edit the category attributes, click the pen icon. A window will open with the various category elements that can be altered.

To delete the category, click the trash can icon.

Note

Deleting a category will not delete the blocks in it. It simply removes the category association from any blocks, then removes any associated navigation elements that reference the category, and finally removes the category itself.

Details

To create a new block, click the Add New button above the search criteria. Choose a unique key and a title for the block and any supporting content.

Adding a block

Once all of your revisions have been made, click "Save All Changes" to commit them to the site.

Layout

A layout is the HTML content or mustach tempate used to display the desired information.

Editing Block Layouts

If creating a static block, simply cut and paste your html into the panel provided. To verify the HTML format, you can click the source button in the toolbar to preview and validate any HTML code present. Click "Save All Changes" to save your content.

Categories

The categories tool allows you to group similar blocks into categories. These can be used for administrative organization purposes, allowing you to quickly navigate to groups of similar blocks especially ones based on the same underlying module.

Editing Block Categories

The categories that this block has been associated with can be seen on the left side of the screen. Clicking the Remove button next to the desired category will remove the current block from that category.

To add this current page to an existing block category, select the desired category from the drop down and click "Add To List"

Change History

The change history tab shows all of the changes that were made to this content and by whom. It is useful for diagnosing unexpected results on your site.