Ektron CMS400.Net Reference

>>Working with Ektron CSM400.NET Server Controls > Displaying Custom XML in Ektron's Server Controls

Displaying Custom XML in Ektron’s Server Controls

Ektron provides a CustomXml property in several server controls that allows you to add custom XML to a control’s generated XML before being processed by its XSLT.

This property is available in code behind when using these server controls:

Cart

Checkout

CurrencySelect

MyAccount

OrderList

Product

ProductList

ProductSearch

Recommendation

CustomXml Property Usage Example

Below is a C# example of using the CustomXml property in code behind.

protected void Page_Load(object sender, EventArgs e)

{

product1.CustomXml = "<banner>Save $$$ While Christmas Shopping!</banner><specials><special><link>ProductDemo.aspx?id=1013</link><text>A great gift for Dad!</text></special><special><link>ProductDemo.aspx?id=1015</link><text>A great gift for Mom!</text></special></specials>";

}

Example of CustomXml XSLT Output

Below is an example of the XML sent to the XSLT file.

<root>

   <customXml>

      <banner>Save $$$ While Christmas Shopping!</banner>

      <specials>

          <special>

               <link>ProductDemo.aspx?id=1013</link>

               <text>A great gift for Dad!</text>

          </special>

          <special>

               <link>ProductDemo.aspx?id=1015</link>

               <text>A great gift for Mom!</text>

          </special>

      </specials>

   </customXml>

   <otherTags>

    ... (for illustration only, there would be many other tags here)

   </otherTags>

</root>

(continued in List of Server Controls)


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.