Using XsltDb Configuration As A UserControl

A very simple example of how you can put a configuration inside skin:

<%-- 1. Register XsltDbHost control --%>
<%@ Register TagPrefix="xsltdb" TagName="SkinObject" Src="~/DesktopModules/XsltDb/XsltDbHost.ascx" %>
<%-- 2. Create ASP.NET control for the particular configuration --%>
<xsltdb:SkinObject RunAt="Server" ConfigurationID="78f74098-0570-4b97-8a83-6b0fb20e545e"/>

XsltDbHost control properties

  • ConfigurationID - uniquely identifies a particular configuration should be used.
  • Alias - Identifies a configuration to be used within current portal using configuration alias.
  • ModuleID - Identifies a configuration to be used within current portal using ModuleID. This is usefull if a configuration is referenced from several modulea and from skin. In this case you have a Module context and can access module settings and other module dependent values.

You can also pass raw data to the configuration and use one configuration for different purposes

<xsltdb:SkinObject RunAt="Server" ConfigurationID="78f74098-0570-4b97-8a83-6b0fb20e545e">
    Some textual or XML content goes here...

After that you can get the context with mdo:xsltdb-context() extension. Note, that context information is not accessible while processing AJAX calls.

If you put an XML content inside XContext node you can access it with mdo:node-set(mdo:xsltdb-context()) construction.

Last edited Mar 5, 2011 at 11:42 AM by findy, version 1


No comments yet.