Index Block
Digest
An Index Block is a special type of block asset that returns a listing of assets from the CMS directory structure in the form of XML data. Assets such as pages, files, folders, external links, and even other blocks can be returned as XML content that describe them. An index block can even return the data content of multiple pages within a directory for use on other pages within the system.
Concept
Introduction to Configuring Index Blocks
Because Index Blocks can be configured to index an entire site or a specific folder, the way you configure Index Blocks in your system will vary depending on your needs and specifications. You can choose to create Index Blocks that are limited by either the number of assets in a given folder, or by the number/depth of folders to index. To ensure dynamic and consistent content across your site, any time content relevant to that Index Block in the system changes (a page is added, deleted, renamed, moved, etc.), the index block automatically updates, and all pages using the index block are also updated.
Using Index Blocks and XSLT Stylesheets
An XSLT stylesheet can be applied to the XML data of an index block, which allows for HTML elements such as dynamic navigation toolbars or page listings to be created on pages throughout an entire site automatically. Examples of dynamic navigation include main menus, sub menus, breadcrumbs, previous/next links, site maps, and site indices. The powerful combination of the automatically populated XML data inside of index blocks and XSLT stylesheets provides unparalleled ease of use with managing large sites.
Technical
Configuring Index Blocks
In Cascade Server, Index Blocks are typically used for creating dynamic navigation menus, site maps, indices, etc.
Index blocks may be configured to index an entire site or a specific folder. An Index Block can be limited by the number of assets to index or by the depth folders that must be indexed. They can also be configured to index parent and/or child folders relative to a specific location. Thus, as an Administrator or Manager, the way you set up Index Blocks in your Cascade system will vary depending on what methods best suit your organizations’ needs.
Any time the data content in the system changes (a page is added, deleted, renamed, moved, etc.), the index block automatically updates, and all pages using the index block are also updated.
Creating/Setting Up Index Blocks
To create an index block:
- In the Home area, select New -> Default -> Block.

- Select the type of block you are creating. In this case, it will be an Index Block.
- On the Content pane:

- Index Folder - Select the folder you wish to index. If you want the block to index nested folders, simply select the highest folder.
- Depth of Index - If you only want one folder indexed, type in “1”. If there are nested (or child) folders that you wish to include, type in the number of levels you want. If you are indexing all levels, but aren't sure how many there are, it is ok to overshoot (i.e. type in 100).
- Max Rendered Assets - Determine how many assets you wish to be rendered. Limiting this number is useful when you want to return only the most recent pages, for example.
- Indexed Asset Types - This allows you to limit the types of assets. For most navigation features, only pages and links need to be indexed.
- Rendering Behavior - This field has a great deal of impact on the structure of the rendered XML. It is important to choose a type of rendering behavior that is best suited to he purpose of a particular index block.
- Render normally, starting at the indexed folder - This is the most common option and allows one to preview the rendered block XML in most cases when viewing the index block itself. This option renders data starting at the "Index Folder", and renders its children forward at a depth specified in the "Depth of Index" field. Subfolders will be included in the render, along with their children, to the extent to which the depth of index will allow.
- Start at the current page and include its folder hierarchy - One may think of this as a backwards render. This rendering option depends on a current page context. That is, that this option requires that the index block be rendered in a region of a page (it is for this reason that you may not see XML in the "view" of an index block asset in Cascade Server). The rendering will start at the current page, render it, and then proceed to render each parent folder until the base folder is rendered. These index blocks tend to be rather small, and are well suited for breadcrumb navigation generation.
- Start at the current page with folder hierarchy, and also include sibling s - This option is like the "Start at the current page and include its folder hierarchy" option, except that for each parent folder asset rendered, it will also render that folder's children as well. For example, when rendering with his option, the renderer will start at the current page and render all of the siblings of that page, including the page itself. It will then render the parent
folder and all of its siblings, repeating until the base folder is rendered. Note that this option will not continue to render sibling folders as the parent folder hierarchy is traversed.
- Start at the current page with folder hierarchy, siblings, and also render forward - This option expands on the "Start at the current page with folder hierarchy, and also include siblings" rendering option, but also includes rendering the siblings of the current page, exactly the same way that the normal rendering option would render the current page's parent folder. This option is in effect, a combination of the "Render normally, starting at the indexed folder" and the "Start at the current page with folder hierarchy, and also include siblings" options. - Page XML - This field controls how page XML is rendered inline during an index block render. The options are explained below:
- Do not render page XML inline - This option will not include any XHTML or structured data content for any page that is included in the index block render.
- Render page XML inline - Default page region content will be included for any page that is included in the index block render. For XHTML pages, it will be the XHTML / WYSIWYG content that one typically edits in the page. For structured data pages, it will be the rendered structured data XML. Note that for structured data pages, this XML will not have any XSLT applied to it.
- Render page XML inline only for current page - This is exactly like the "Render page XML inline" option, but only the current page is rendered in this manner. All other pages that are included in the index block render will not have the default page content included for those pages in the resulting document.
- In general, rendering inline page content will increase the size of the index block and will increase the amount of time needed to render the index block. It's recommended that this option only be used if necessary.
- Note that the "Regular Content" checkbox must be checked in order to render page XML. - Block XML - This field controls how block XML is rendered inline during an index block render. The options are explained below:
- Do not render block XML inline - This is the default and does not render any block content inline.
- Render XHTML, XML, and text block XML inline - This option will render inline the contents of any XHTML, XML, or text blocks in the overall document.
- Note that the "Regular Content" checkbox must be checked in order to render block XML. - Indexed Asset Content - This allows you to determine what information is included in results. These results may be styled or filtered via the XSL stylesheet.
- Other Indexed Information - These options are useful for internal reports.
- Sort Method - This determines the order in which assets are rendered.
- On the Metadata pane:
Enter the desired metadata values.
- On the System pane:
Name - It's most useful to name index blocks according to their purpose (the folder they index) and where they will be used (page region).
Parent Folder - This is where your index block will be stored. It's most useful to store index blocks in a central or common location.
- Click Submit to save your new index block.
More on Index Blocks (Administrators and Managers)
An index block is defined by the following WSDL:
An index block contains many fields, most of which are options for what exactly should be included in the rendered XML of the index block. The boolean and numeric fields are self-explanatory, and the "indexedFolderId" or "indexedFolderPath" property is as well. One field of note is the sort method ("sortMethod"), which specifies how assets are sorted in individual folders before those assets are rendered into the XML content of the block. This property takes a String, one of " folder-order", " alphabetical", " last-modified-date", and " created-date", which are self-explanatory.

