Topic of Type Cloud

Top  Previous  Next

The Topic of Type Cloud for EPiServer is available in the NetworkedPlanet.EPiServerTopicMapIndexModule.WebParts.TopicOfTypeEPiServerCloudControl.

The following properties are exposed on this web part:

Property Name

Required

Default Value

Description

TopicTypeSI

Yes

None

This is the subject identifier of the topic type of which all topics in the cloud will be instances.

EPiServerProperties

No

None

A semi-colon delimited list of EPiServer page property names that should be included in the XML. The name of the element will be the same as the property name. If the property does not exist on the page then the element will be omitted.

Common Properties on Topic of Type Cloud Web Parts

Topic of Type clouds are typically used within the context of the entire topic map. Each member of the cloud is an instance of a particular topic type. The importance of each topic shown in the cloud is proportional to the number of associations to that topic, filtered by an association type.

So for example: a map that contains topic types of "Person" and "Skill" may have an association "Person has Skill". You can then show topic of type cloud: "Show all people using the number of skills they have as the importance", to see who the most skilled individuals are.

The ASP.NET code to do this is shown below:

<EPiParts:TopicOfTypeEPiServerCloudControl runat="server" ID="personBySkillsCloud"

  AssociationTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkill"

  SourceRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkillSource"

  TargetRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkillTarget"

  TopicTypeSI="http://www.networkedplanet.com/psi/organisation/person"

  TopicMapName="EPiCMSDemo"

  XslLink="/EPiServer1/NetworkedPlanet/EPiServerModuleDemo/Xsl/TopicCloud.xslt"

/>

Another example, using this simple association is: "Show all the skills known using the number of people who know them as the importance":

<EPiParts:TopicOfTypeEPiServerCloudControl runat="server" ID="skillsByPersonCloud"

  AssociationTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkill"

  SourceRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkillTarget"

  TargetRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkillSource"

  TopicTypeSI="http://www.networkedplanet.com/psi/organisation/skill"

  TopicMapName="EPiCMSDemo"

  XslLink="/EPiServer1/NetworkedPlanet/EPiServerModuleDemo/Xsl/TopicCloud.xslt"

/>

Note that an XSLT file is specified in both cases using the XslLink attribute. By default the controls will render as XML in the following form:

<OneHopDataSet>

  <OneHopDataTable>

    <topicid>topic id</topicid>

    <si>Page/Topic GUID</si>

    <name>Page Name</name>

    <linkUrl>URL to link to page</linkUrl>

    <pageId>EPiServer Page ID</pageId>

    <count>Instance Count</count>

    <CssClassName>CSS class name</CssClassName>

  </OneHopDataTable>

  <OneHopDataTable>

    ....

  </OneHopDataTable>

</OneHopDataSet>

Each element of the XML is used as follows:

Element Name

Cardinality

Description

OneHopDataSet

1

This is the root element of the XML document.

OneHopDataTable

1 as a direct child of OneHopDataSet.

This represents a single topic that is to be displayed in the cloud.

topicid

1 per OneHopDataTable

The ID of the topic in the cloud.

si

1 per OneHopDataTable

Contains the subject identifier of the topic, the EPiServer Page GUID is present here.

name

0..1 per OneHopDataTable.

The name of the EPiServer Page that the topic represents. If the topic does not represent an EPiServer page then this element will not be present.

linkUrl

0..1 per OneHopDataTable.

A URI that may be used in the href attribute of an anchor link to link to the page. If the topic does not represent an EPiServer page then this element will not be present.

pageId

0..1 per OneHopDataTable.

The EPiServer Page ID of the page that the topic represents. If the topic does not represent an EPiServer page then this element will not be present.

count

1 per OneHopDataTable

The number of associations found to this topic. This represents the absolute value that determines the importance of the topic.

CssClassName

1 per OneHopDataTable

The name of the nominated CSS class that should be used to render the topic name. See Styling Cloud Controls for more information about how this works.

Interpretation of XML Elements in Topic Cloud Response