Auto Cloud Control

Top  Previous  Next

The "Auto Cloud" control is a special control that uses the topic map ontology to place a set of Topic Clouds on a page. Each topic type describes a set of suitable cloud definitions using NPCL extensions (see TMCore documentation for more information on NPCL extensions).

The NPCL extension has the public subject identifier http://psi.networkedplanet.com/npcl/clouds/CloudDescription. It should be of types:

1.http://www.networkedplanet.com/psi/npcl/meta-types/occurrence-type (an NPCL occurrence)
2.http://www.networkedplanet.com/psi/npcl/meta-types/npcl-extension-type (an NPCL extension)

The occurrence is a value-based occurrence of type string (UTF-8 encoded) and the value should be an XML document adhering to the following schema (in DTD and XML Schema formats)

<!ELEMENT topicOfTypeCloud (topicType,associationTemplates?)>

<!ATTLIST topicOfTypeCloud

   title CDATA #IMPLIED

>

<!ELEMENT associationTemplates (associationTemplate+)>

<!ELEMENT associationTemplate (associationType, sourceRoleType, targetRoleType)>

<!ELEMENT associationType (#CDATA)>

<!ELEMENT sourceRoleType (#CDATA)>

<!ELEMENT targetRoleType (#CDATA)>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" name="topicOfTypeCloud">

  <xs:complexType>

    <xs:sequence>

      <xs:element ref="topicType"/>

      <xs:element minOccurs="0" ref="associationTemplates"/>

    </xs:sequence>

    <xs:attribute name="title" type="xs:string"/>

  </xs:complexType>

  <xs:complexType>

    <xs:sequence>

      <xs:element maxOccurs="unbounded" ref="associationTemplate"/>

    </xs:sequence>

  </xs:complexType>

  <xs:complexType>

    <xs:sequence>

      <xs:element ref="associationType"/>

      <xs:element ref="sourceRoleType"/>

      <xs:element ref="targetRoleType"/>

    </xs:sequence>

  </xs:complexType>

</xs:schema>

For example:

<?xml version="1.0"?>

<cloud title="Skills">

  <topicType>http://www.networkedplanet.com/psi/organisation/skill</topicType>

  <associationTemplates>

    <associationTemplate>

      <associationType>http://www.networkedplanet.com/psi/organisation/personHasSkill</associationType>

      <sourceRoleType>http://www.networkedplanet.com/psi/organisation/personHasSkillTarget</sourceRoleType>

      <targetRoleType>http://www.networkedplanet.com/psi/organisation/personHasSkillSource</targetRoleType>

    </associationTemplate>

  </associationTemplates>

</cloud>

There is no limit on the number of extensions that may be added to a topic type.

When the NetworkedPlanet.EPiServerModuleDemo.Controls.AutoCloudSelector class is added to a page, it can be configured with the following properties:

Property Name

Required

Default Value

Description

ShowPublishedOnly

No

true

If set to true then only topics marked as published, or topics that have no publication status will be shown. If false then all topics are shown.

TitleCssClass

No

None

The CSS class applied to the title block written above the cloud.

TopicTypeSubjectIdentifier

Yes

None

This is the subject identifier of the topics to be shown in the cloud and of the topic type to read the cloud definitions from.

XslLink

No

None

This property specifies the URL of the stylesheet to use. Relative URLs will be resolved against the URL of the page on which the web part is displayed. If the XslStylesheet property has a non-null, non-empty value then this property is ignored.

XslStylesheet

No

None

Get or set the XSLT stlylesheet used to render the content of the web part. Any non-null, non-empty value for this property overrides the value of the XslLink property.

Properties of the Auto Cloud Selector Control