KB Version:

Page Navigation

Related Links

Learning Levels

Most Read

Announcements RSS Feed of Announcements

Index Block

Digest

blockAn 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. Index blocks are the cornerstone of dynamic content reuse within the system.

Concept

Configuring Index Blocks

Index Blocks are typically used for creating dynamic navigation menus, site maps, indices, etc.  As 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.  They can also be configured to index parent and/or child folders relative to a specific location.  To ensure dynamic and consistent content across your site, any time content relevant to that Index Block changes (a page is added, deleted, moved, etc.), the index block automatically updates, and all pages using the index block are also updated.

With the release of Cascade Server 5.7, Content Type Index Blocks were introduced, which allow rapid indexing of all Pages that use a particular Content Type.  This index is rendered without any Folder structure and all pages appear at the root of the index. This may be particularly useful when aggregating content of a particular type from across a number of different Folders, without having to pull in Pages of different types.

Additionally, new block icons have also been added to allow users to distinguish between Index, XML, XHTML, Text, and Feed Block types without having to render or edit the block itself.

Index Blocks and XSLT Formats

An XSLT format 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 formats provides unparalleled ease of use with managing large sites.

FAQs

  • How do I create a 'current page' index block?

Technical

Creating Index Blocks

To create an index block:

  1. In the Home area, select New ->  Default ->  Block.

newdefaultmenubl

2. Select Index Block as your Block Type.

 

 

3. On the Content pane, you are offered two different Index Types:

 

Folder Index

The first is Folder Index, which offers the following options:

New Index Block showing Folder Index options

  • 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).
    *Note - Depth of Index field is only a valid/usable when "Render normally, starting at indexed folder" or "Start at the current page with folder hierarchy, siblings, and also render forward" is selected under the "Rendering Behavior" option.

     

  • 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.
    *Note - Max Rendered Assets field is only a valid/usable when "Render normally, starting at indexed folder" is selected under the "Rendering Behavior" option.

     

  • 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 - the "Regular Content" checkbox must be checked in order to render page XML.
    Page XML option fields will only be valid/usable if either a) "Page" is selected under "Indexed Asset Types," or b) under the header "Other Indexed Info" the "Append Calling Page Data" is checked.
  • 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.
    Block XML option fields will only be valid/usable if "Block" is selected under "Indexed Asset Types." 
  • 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.

 - When rendering page XML with "Regular Content" checked, this option will provide <path>, <link>, and <site> attributes, in addition to any indexed XML content. See the example below for the elements appearing when rendering an Index Block with the "Regular Content" option selected:

  • Other Indexed Information - These options are useful for internal reports.
  • Sort Method - This determines the order in which assets are rendered.
    • Folder Order - by the Folder Order property of the assets
    • Alphabetical - alphabetical by the asset's system name
    • Last Modified Date - by the last modified date of the asset – ascending (from least recently modified to most recently modified) and descending (most recently modified to least recently modified)
    • Creation Date - by the creation date – ascending (from oldest to newest) and descending (from newest to oldest)
  • Sort Order- This determines the way in which the rendered assets are ordered. assets are rendered.
    • Ascending
    • Descending

Content Type Index

The second is Content Type Index, which offers the following options:

Content Type Index Block

  • Index Type - Select Content Type Index.
     
  • Content Type - Locate Content.
  •  

    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.

  • 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.

     

  • 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 Info - These options are useful for internal reports.

     

  • Sort Method - This determines the order in which assets are rendered.
  • Sort Order - This determines whether the assets are sorted in ascending or descending order.

Common Options

4. On the Metadata pane:

  • Enter the desired metadata values.

5. 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.

6. Click Submit to save your new index block.

Indexed Asset Content

The following table is all the options for "Indexed Asset Content" and "Other Indexed Information" and the XML elements they return.  Regular Content, System Metadata, User Metadata, Folder Access Rights, and Workflow Information elements all start under <system-page>, <system-block>, <system-file>, <system-symlink>, and <system-folder>.  User Information and Append Calling Page Data elements start under <system-index-block>.

Regular Content

<path> The path from the root of the Site
<site> The site-link notation of the asset (Only available in a Site)
<link> The site-link notation of the asset (Only available in a Site)
<display-name> The "Display Name" metadata field

System Metadata

Metadata populated by Cascade automatically
<is-published> Returns "true" if the asset has Include when publishing checked or "false" if the asset does not have Include when publishing checked
<created-by> The username of who created the asset
<created-on> The timestamp of when the asset was created
<last-modified-by> The username of who last modified the asset
<last-modified> The timestamp of when the asset was last modified

User Metadata

Any metadata populated by a User (except Display Name, which is rendered in Regular Content)
<title>
<summary>

<author>
<teaser>
<keywords>
<description>
<start-date> UNIX Timestamp of the start-date
<end-date> UNIX Timestamp of the end-date
<dynamic-metadata> The element that holds <name> and <value> for dynamic metadata fields. 
<name> The name of the dynamic metadata field.  Child element of <dynamic-metadata>
<value> The value of the dynamic metadata field.  There can be multiple <value> nodes for Checkbox field types

Folder Access Rights

Information about the Access Rights of the assets
<access-rights> All the access rights information is contained in this element
<user> Each user's permissions are in this element. If a user does not have read or write permissions to the asset, the <user> node is not rendered.  <user> has <name> and <permssion> as children elements.
<name> Username
<permission> The values read or write
<group> Each group's permissions are in this element. If a group does not have read or write permissions to the asset, the <user> node is not rendered.  <group> has <name> and <permssion> as children elements.
<name> The name of the group
<permission> The values read or write

User Information

Adds an element after rendering the assets (i.e. towards the bottom of the Index Block) with information about the user accessing the page inside Cascade Server.  This information can be helpful for generating pages for view inside of Cascade Server specific to the User.
<user-information> The element that contains all the user information nodes
<username> The username of the user currently accessing the Index Block (i.e. your username when viewing the Index Block)
<full-name> The current user's full name
<groups> Contains <group> nodes for each group of the user
<group> The Group's name

Workflow Information

Contains any Workflow information about the asset
<workflow> The element that contains all the workflow information
<initialized> If the workflow has started: true or false are the values
<name> The name of the workflow
<owner> The username of the workflow's owner (i.e. the User who started the Workflow)
<related-entity-id> The unique Cascade Server identifier of the asset in workflow
<related-entity-type> The entity type of the asset in workflow: page, block, file or symlink
<start-date> The date the workflow began (in the format: MMM DD, YYYY hh:mm a)
<end-date> The date the workflow expires (in the format: MMM DD, YYYY hh:mm a)
<status> The workflow's status: In Progress or Completed
<current-step> If <status> is In Progress, information about the step the workflow is in currently
<step> Element that contains all the information about the current step
<identifier> The step's unique name
<name> The name of the step
<type> The type of step: edit, transition, or system
<owner> The user or group the step is assigned
<owner-type> Either user or group
<started-one> The date the step was started (in the format: MMM DD, YYYY hh:mm a)
<actions> Element that contains <action> elements with the information about each action this step contains
<action> Element that contains information about the action
<identifier> The action's unique identifier
<name> The name of the action
<action-type> The type of action: forward, reverse, or explicit
<entity-information> Contains additional information about the entity attached to this Workflow
<id> The entity's unique Cascade identifier
<cache-path> The path of the entity from the root of the Site
<name> The name of the entity
<type> The entity type: page, file, block or symlink
<lock-information> Contains information who has the entity locked with the element <lock-owner>
<lock-owner> The name of the user who has locked the entity
<steps> Contains <step> elements for each ordered step in the Workflow Definition.  (See <step> above).
<unordered-steps> Contains <step> elements for each unordered step in the Workflow Definition (See <step> above).
<histories> Contains <history> elements for each change in the workflow
<history> Element that represents an update to the workflow
<who> Username of who updated the workflow
<timestamp> The date the update occurred (in the format: MMM DD, YYYY hh:mm a)
<action-name> The name of the action used to update the workflow
<comments> Any user comments entered after the action was taken
<source-step-name> The name of the step where this update occurred
<dest-step-name> The name of the step where the update takes the workflow

Append Calling Page Data

Adds all information about the current page using this index block
<calling-page> Contains all information about the current page in a <system-page> element.

Related Links