Products and Services
Graffiti CMS
Learn more about our simple content publishing platform.
Harvest Reporting Server
Get business intelligence tools for measuring online behavior.
Professional Services
Consulting, creative, and Web services from the people who know Community Server best.
Solutions
Telligent
Learn more about our team at Telligent.com.
 

Setting Defaults for Widget Dynamic Configuration Properties

When shipping a custom theme, you can include a default set of widgets for each column of widgets supported by the theme. 

 

Any time a user installs a theme with the default widget dynamic configuration properties, the theme will use the default settings. Also, any time you click Restore Defaults on the theme configuration page in the Control Panel, Community Server will use these default properties.

Procedure

  1. Define the widget <property /> node.
  2. Add the supporting Chameleon controls.
  3. Select the theme.
  4. Configure the widgets that you want to include in your theme by default.
  5. Save the theme changes.
  6. Export the theme so you can use the configuration data in the sharable XML version.

clip_image002

  1. Open the exported file.
  2. Locate the <property /> node with the id matching the id given to each widget column.
  3. Do the following:
    • In the exported file, copy the contents of the <value /> node (<![CDATA[... blah ... ]]>) for each <property /> node relating to a widget column.
    • Open the theme’s theme.config.file.

In the theme.config.file, paste the copied contents into a <defaultValue /> node within the <property /> node that defines the widget.

The result should look like this:

<property id="myWidgetColumn" text="Widgets" dataType="Custom" controlType="CommunityServer.Controls.ContentFragmentsCustomControl, CommunityServer.Controls">
  <defaultValue>
    <![CDATA[
      <contentFragments>
        <contentFragment type="CommunityServer.Controls.SiteUrlContentFragment, CommunityServer.Controls" id="2df9ece8-fe74-46c6-b82a-a42a65664fe8" configuration="fragmentTitle=Shortcuts&amp;controlpanel=False&amp;blogAdmin=False&amp;mediaAdmin=True&amp;user_List=False&amp;post_NotRead=False&amp;forumSubscriptions=False&amp;usersOnline=False&amp;forumModeration=False&amp;hub_create=False&amp;allGroups=False&amp;groupAdmin=False&amp;customLinks=&amp;listCssClass=CommonSidebarList" />
        <contentFragment type="CommunityServer.Controls.TagCloudContentFragment, CommunityServer.Controls" id="2b1a7190-3b89-4a19-985c-eaf6c41e993d" configuration="applicationType=MediaGallery&amp;ignoreFilterTags=False&amp;maximumTags=25&amp;minimumPostsPerTag=0&amp;filterTags=&amp;fragmentTitle=Tags&amp;tagCloudCss=CommonSidebarTagCloud&amp;tagCss=CommonTag6%2cCommonTag5%2cCommonTag4%2cCommonTag3%2cCommonTag2%2cCommonTag1&amp;showTagCounts=False&amp;noTagsText=No+Tags+Found&amp;linkTo=ContextualTagBrowser" />
      </contentFragments>
    ]]>
  </defaultValue>
</property>