XML Block

Digest

block An XML block is a reusable piece (block) of content stored as well-formed, static XML.  XML blocks are particularly useful when there is a large amount of XML that must be styled and included on one or more pages of a site.

Concept

Once a user creates a block in Cascade, he or she can reuse that content and apply it to a page region in a template, configuration set, or page. If desired, users can also style the block with an XSL Stylesheet.

If a block is applied at the template level, the block content will appear in all pages using that template. Any blocks assigned at the page configuration level will appear in any pages using that configuration. Therefore, a single change to one of these blocks will be present across all pages of the site that make use of the block.

Technical

Creating an XML Block

To create an XML block:

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

new block

  1. Select the type of block you are creating. In this case, it will be XML Block.

  2. On the Content pane:
                    Enter any XML desired.
  1. On the Metadata pane:
                    Enter any Metadata desired.
  2. On the System pane:
                    Name - Type in the name of your new block.                                 

                        Parent Folder - This is where the block will be stored. It's most useful to store blocks in a central or common location.

  1. Click Submit to save your block
new xml block

XML blocks may be edited or deleted by selecting the block and choosing the appropriate tab.


More on XML Blocks for Administrators and Managers

An XML block is defined by the following WSDL:

 

 

An XML block contains XML content via the "xml" field.

 

XML Block Synchronizer

This information will guide you through using the XML Block Synchronizer Script to import XML from a specified URL into Cascade.

*Please note, you must be using PHP 5 or later to utilize the XML Block Synchronizer Script.

 

XML Block Synchronizer Components

The synchronizer has very few components, making it fairly easy to use. A breakdown of the components follows:

1.       Block Synchronizer Configuration File - This file is very straightforward -- it only requires your CMS address, username, and password, and the path of the XML you wish to import to the CMS. 

2.       Block Synchronizer Configuration Data Definition - This is the data definition used to generate the configuration page.

3.       The Script - The script is just as simple as the other components. It opens the configuration file, extracts the information, and then executes a web services request to create a new XML block in Cascade at the specified path, containing the data from the URL given to it.

Related Links