CommunityDocuments
The CommunityDocuments server control displays a list of uploaded content filtered by category. In addition, a logged-in member can manage files, create categories, and decide which users can view the documents. This server control is typically placed on a user’s or a group profile page.
NOTE: When you drag and drop this control on a Web form in Visual Studio, the following message appears in the label of the control: “Workspace for user does not exist”. This happens because no ID is assigned to the control. When you assign an ID, the control’s name and the ID are displayed. If you use the DynamicParameter
property to dynamically pass an ID from the QueryString, the above message appears because an ID is not assigned to the control.
Inserting the CommunityDocuments server control onto a page
Prerequisite
You must have installed the server controls. See Installing server controls into Visual Studio Toolbox.
- In Visual Studio, choose View > Toolbox.
- Click the Ektron server control tab to display the server controls.
- Drag the CommunityDocuments server control and drop it into the desired location on the page.
NOTE: You also can place the cursor on the page where you want the server control, then double click the server control that you want.
<CMS:CommunityDocuments ID="CommunityDocuments1" runat="server" />
- Click on
CommunityDocuments
in the code to display and modify the control’s properties using the Properties window of Visual Studio. The page is updated as you modify the property values.
CommunityDocuments properties
The following are Ektron-specific server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified. properties. For information about native .NET properties such as font, height, width and border style, use Visual Studio® help.
- CacheInterval (Double)
The number of seconds that a server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified.’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See also: Caching with server controls.
- DefaultObjectID (Long)
The default object ID for this control to use when there is no matching dynamic parameter value passed.
- DisplayXslt (String)
If desired, enter a relative or absolute path to an Xslt that determines the display of the page.
WARNING! If you enter a valid EkML file at the MarkupLanguage property, the Displayxslt property value is ignored.
WARNING! Files stored in the
siteroot\Workarea
folder are overwritten (or deleted) when you upgrade Ektron. To avoid problems, copy the default file to a folder outside thesiteroot\workarea
folder then edit it. If there is no default file, create the file outside thesiteroot\workarea
folder. Next, in this property, enter the path to that file relative to the site root folder. - DoInitFill (Boolean)
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
- DynamicContentBoxHeight (Integer)
The height of the dynamic content box in pixels.
- DynamicContentBoxWidth (Integer)
The Width of the dynamic content box in pixels.
- DynamicContentTemplate (String)
The template to use when displaying dynamic content. Leave blank to use the dynamic box.
- DynamicParameter (String)
Gets or sets the QueryString parameter to read a object ID dynamically. To use the default object ID, leave blank.
- EnablePaging (Boolean)
This property, in conjunction with the MaxNumber property, lets site visitors view an unlimited number of items while controlling the amount of screen space. The MaxNumber property limits the number of items displayed. If you set this property to True, and the number of items exceeds MaxNumber, navigation aids appear below the last item, allowing the visitor to go to the next screen.
- GetAnalyticsData (Boolean)
Set this property to True if you want the following information for each content in the list. Returns Content View Count, Content Rating, Content Rating Average. Create your own XSLT styles to display this data.
IMPORTANT: This property provides reliable data only when the Business Analytics Feature is on. See Running Ektron Business Analytics.
- Hide (Boolean)
Hides or displays the output of the control in design time and run time.
- True. Hide the control output.
- False. Display the control output.
- IncludeIcons (Boolean)
Choose whether to display icons next to the navigation list’s links.
- True. Show icons
- False. Hide icons
- Language (Integer)
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
- LinkTarget (String)
Determines the type of window that appears when you click a link in the server control.
- _Self (default). Opens in same window.
- _Top. Opens in parent window.
- _Blank. Opens in new window.
- _Parent. Opens in the parent frame.
- MarkupLanguage (String)
Enter the template markup file (
.ekml
) that controls the display of this server control. To use the default .ekml file, leave this field blank.The default file follows this pattern:
\siteroot\Workarea\template\this object\objectname.ekml
. For example,\siteroot\Workarea\template\collection\collection.ekml.
To customize the default .ekml file, copy it to a folder outside the
siteroot\workarea
folder and edit it. Next, in this property, enter the path to that file relative to the site root folder.See also: Ektron Markup Language
- MaxResults (Integer)
Enter the maximum number of items to appear in the initial display of this server control. To set no maximum, enter zero (0). To let site visitors view more than the maximum but limit the amount of space, enter the maximum number of results per page here. Then, set the EnablePaging property to True. If you do and more than the number of MaxResults are available, navigation aids help the site visitor view additional items.
- ObjectType (CommunityDocumentsObjectType)
The type of object to which this control is assigned. Choices are:
- User. Control assigned to an individual
- Group. Control assigned to a community group
- ShowCount (Boolean)
Determines if an integer representing the number of items in a category appears next to the category.
- True. Show number next to category
- False (default). Do not show number next to category
- ShowRoot (Boolean)
- False. Top represents the first node of the taxonomy path.
- True. The name of the taxonomy path's first node appears instead of Top.
- SortDirection (String)
Select the direction of the
itemSortOrder
property. Choose Ascending or Descending. - Stylesheet (String)
Specify the path to a style sheet for use with this server control. Leave blank to use the default style sheet. To use a custom style sheet, place it in a folder outside the
siteroot\workarea
folder then edit it. Next, in this property, enter the path to the custom style sheet relative to the site root folder.NOTE: If you enter a valid EkML file at the
MarkupLanguage
property, theStylesheet
property is ignored. - TaxonomyCols (Integer)
Enter the number of columns in which this taxonomya content-level categorization system that uses one-to-many relationships (such as Ronald Reagan is to Actor, Governor, and President) to create a scalable organization of content. A taxonomy lets your site visitors navigate content independent of the folder structure./category appear on the page.
- TaxonomyItemCols (Integer)
Enter the number of columns in which the taxonomy item appears on the page.
- WrapTag (String)
Lets a developer specify a server control’s tag.
- Span (default). Designate an inline portion of an HTML document as a span element.
- Div. Apply attributes to a block of code.
- Custom. Lets you use a custom tag.
Using CommunityDocuments with an individual user profile
Part of the Community Platform, this server control lets users create and upload individual user content to the user profile. The content can be HTML content or an assetan external file, such as a Microsoft Word document or image, stored in one of these Ektron siteroot folders: assets, privateassets, uploadedfiles and uploadedimages. An asset can be managed like native Ektron content., such as a .PDF document or a .jpeg file.
Adding folders to your workspace
- On the website, navigate to a User’s Profile Page > Workspace.
- Click Manage Folder (). The Add Folder box appears.
- Enter a Name for the folder.
- Determine with whom you want to share the folder's documents. For a description of the Share options, see Sharing workspace content.
- Click Add. The page refreshes and displays the newly added folder.
Editing a folder name in your workspace
- On the website, navigate to a User’s Profile Page > Workspace.
- Click Edit (), located to the left of the folder’s title. The Edit Folder dialog appears.
- Change the name of the folder.
- Click Save. The page refreshes and shows the folder's new name.
Deleting a folder from your workspace
NOTE: You can not delete the top-level folder, Workspace.
WARNING! Deleting a folder permanently deletes the assets and HTML content in the folder, and its subfolders.
- On the website, navigate to a User’s Profile Page > Workspace.
- Click Edit (), located to the left of the folder’s title. The Edit Folder dialog appears.
- Click Delete. A dialog box asks you to confirm.
- Click OK.
Adding assets to a workspace
Assets are files that are not HTML content, such as an Office document or PDF.
- On the website, navigate to a User’s Profile Page > Workspace.
- Select a folder to which the asset will be added. If you want to create a new folder, see Adding folders to your workspace
- Click Add Asset (). The Add Asset box appears. Its appearance varies depending on your browser, and so on. To learn about these variations, see Methods for Importing Assets.
- Import one or more assets, depending on the screen. A status box shows the files being uploaded and then the asset(s) appear in the file list.
Creating HTML content in your workspace
- On the website, navigate to a User’s Profile Page > Workspace.
- Select a folder where the content will be added. If you want to create a new folder, see Adding folders to your workspace
- Click Add HTML Content (). The Add HTML Content window appears.
- Add a title and content.
- Click Publish to publish the content.
- The HTML content appears in the file list.
Moving and copying content in your workspace
You can move or copy assets and HTML content from one folder to another. To accomplish either action:
- On the website, navigate to a User’s Profile Page > Workspace.
- Select the folder from which to move or copy the content.
- Click the drop-down triangle to the right of the content title.
- From the drop-down list, select Copy.
- Select the folder to which the content will be moved.
- Click Manage.
- Click Move Items () or Copy (). A dialog box asks you to confirm.
- Click OK. The moved or copied content appears in the folder.
Sharing workspace content
The Workspace area allows users to share content with colleagues. Users can share content with the Public, Colleagues, Selected Colleagues or keep the content private.
Users apply sharing options to folders, not individual content items. To share a folder:
- On the website, navigate to a user’s or community group's Profile Page > Workspace.
- Locate the folder you want to share.
- Click Manage Folder (). The Add or Share Folder dialog box appears.
- Click Share Folder () in the top right corner. The Share Folder dialog box appears.
- Select with whom to share your folders.
- Public. Everyone viewing your Workspace
- Colleagues. Only colleagues. See also: Friends server control
- Selected Colleagues. Only selected colleagues See also: Designating a selected colleague.
- Private. Only you
- Click Share.
Documents in the folder are now available for viewing by the selected viewer type.
Using CommunityDocuments with a group profile
Part of the Community Platform, this server control lets users create and upload group content to the group profile. The content can be HTML content or an assetan external file, such as a Microsoft Word document or image, stored in one of these Ektron siteroot folders: assets, privateassets, uploadedfiles and uploadedimages. An asset can be managed like native Ektron content., such as a .PDF document or a .jpeg file.
Adding folders to the group workspace
Community group members can add folders to the Workspace to help organize items in the Documents area.
- On the website, navigate to a community group’s Profile Page > Workspace.
- Click Manage Folder (). The Add Folder dialog appears.
- Enter a Name for the folder.
- Determine with whom you want to share the folder's documents.
- Public. Anyone can view and edit the document
- Private. Only group members can view and edit the document
NOTE: If you want to later change a folder's share setting, follow the directions in Sharing workspace content.
- Click Add. The page refreshes and displays the newly added folder.
Editing a folder name in a group workspace
- On the website, navigate to a community group Profile Page > Workspace.
- Click Edit (), located to the left of the folder’s title. The Edit Folder dialog appears.
- Change the name of the folder.
- Click Save. The page refreshes and shows the folder's new name.
Deleting a folder from a group workspace
NOTE: You can not delete the top-level folder, Workspace.
WARNING! Deleting a folder permanently deletes all of the assets and HTML content in the folder, as well as its subfolders.
- On the website, navigate to a community group's Profile Page > Workspace.
- Click Edit (), located to the left of the folder’s title. The Edit Folder dialog appears.
- Click Delete. A dialog box asks you to confirm.
- Click OK.