Ektron CMS400.Net Reference

>>Managing Content > Content Properties > Metadata > MetaDataList Server Control

MetaDataList Server Control

Use the MetaDataList server control to create lists based on Keyword Names and Keyword Values contained within the metadata of content. In the example below, KeyWord names are circled in red, and KeyWord values are circled in green.

The list can display the information as a list of hyperlinks. You can choose, based on properties you set, to display the summary and how to order the display. For general information Metadata, see Working with Metadata.

This subsection contains the following topics:

MetaData Server Control vs. MetaDataList Server Control

MetaDataList Server Control Properties

Retrieving the XML Structure of a MetadataList

Note: On a PageBuilder page, you can insert a metadata list using the MetaDataList widget. See Also: Widget Reference

MetaDataList Server Control Properties

The MetaDataList server control properties are described in this table.

Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.

Property

Value

Authenticated

Indicates if you are logged in to the CMS Explorer and can use it to browse to Content, Collections, etc. See Also: Using CMS Explorer to Browse Your Ektron CMS400.NET Site

Data Type: String

CacheInterval

Sets the amount of time the server control’s data is cached. The default is 0 (zero). This is the amount of time, in seconds, a control’s data is cached. For example, if you want to cache the data for five minutes, set this property to 300 (three hundred). See Also: Caching with Server Controls

Warning! If the EnablePaging property is set to True, the CacheInterval property is disabled.

Data Type: Double

ContentType

Select a type of content for this control. Choices are:

All Types

Content

Forms

Archive_Content

Archive_Forms

Assets

Archive_Assets

LibraryItem

Multimedia

Archive_Media

NonLibraryContent

DiscussionTopic

To learn about archived content, see Setting Archive Options.

Data Type: Ektron.Cms.Controls.CmsWebService.CMSContentType

DisplayXslt

Determines how the information on the page is displayed

None-databind only

ecmNavigation - lists the title of every content block in the folder

See Also: Using the Collection Server Control

ecmTeaser - lists the title of every content block in the folder plus the content summary.

See Also: Using the Collection Server Control

Path to Custom Xslt - Enter the path to an Xslt that determines the display of the page

Data Type: String

Warning! If you specify an external file, it is strongly recommended that you do not store this file in your site's Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

Warning! If you enter a valid EkML file at the MarkupLanguage property, the Displayxslt property value is ignored.

 

DoInitFill

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 codebehind and have it render with your changes shown.

EnablePaging

This property, in conjunction with the MaxNumber property, lets site visitors view an unlimited number of content items while controlling the amount of screen space. To accomplish this, the content display is limited to the number set in the MaxNumber property.

If you set this property to true, and the number of content items exceeds the MaxNumber number, navigation aids appear below the last item. The site visitor uses the aids to view additional items. See example below.

Data Type: String

So, for example, if specified metadata is found in 9 items and the MaxResults property is set to 3, the screen displays only the first three items. When the site visitor clicks [Next], he sees items 4, 5 and 6, etc.

Warning! If the EnablePaging property is set to True, the CacheInterval property is disabled.

Data Type: Boolean

ExactPhrase

Determines whether the KeyWordValue needs to match the metadata value exactly.

For example, if “site” is the KeyWordValue, the title of a content block is “Welcome to the site” and ExactPhrase is set to true, you would not see the content block in the metadata list. This is because “site” does not equal “Welcome to the site”.

True = Match the exact phrase

False = Doesn’t need to match exact phrase

Data Type: Boolean

FolderID

The folder ID from which content is retrieved. At the Recursive property, you determine if content in this folder’s subfolders is also retrieved.

Data Type: Long

GetAnalyticsData

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.

Warning! This property only provides reliable data when the Business Analytics Feature is on. Enabling the Business Analytics Feature.

Data Type: Boolean

GetHtml

Set to True if you want to display the content (html body) for all content to appear on this metadata list. For example, you want to display content inside a Web server control such as a GridView.

Data Type: Boolean

Hide

Used to hide a metadata list in design time and run time.

True = Hide metadata list.

False = Show metadata list.

Data Type: Boolean

IncludeIcons

Choose whether to display icons next to the metadata list’s links.

Warning! This property only works when ecmSummary or ecmTeaser are used in the DisplayXslt property. When the [$ImageIcon] variable is used in an EkML file and that file is assigned to the MarkupLanguage property, this property acts as True.

Data Type: Boolean

KeyWordName

KeyWordName represents a metadata definition, that is, the container for the KeyWordValues. Examples of a KeyWordName are Keywords and Title.

To view an illustration of the relationship between KeyWordName and KeyWordValues, see MetaDataList Server Control.

If you are authenticated, you can click the ellipsis button and select from a list of existing metadata definitions. See Using CMS Explorer to Browse Your Ektron CMS400.NET Site.

For information on creating metadata definitions, see Working with Metadata Definitions.

Data Type: String

KeyWordValue

Enter the values associated with the KeyWordName. Only content whose metadata (defined at the KeyWordName property) matches this value appears on the metadata list.

Examples of a KeyWordValue are “home; page; company.” To view an illustration of the relationship between KeyWordName and KeyWordValues, see MetaDataList Server Control.

Note: The character that separates multiple items is defined at the KeyWordValueSeparator property.

Note: At the KeyWordValueMatchAll property, you determine if all metadata definition values must match or any one of them.

Data Type String

KeyWordValue MatchAll

This property is only used if you enter more than one keyword value.

If you do, and only want content to appear on the metadata list if all values entered at the KeyWordValue field match its metadata values, enter true.

If metadata can appear on the list as long as any value defined at the KeyWordValue field matches the selected metadata value for a content item, enter false.

Example:

KeyWordValue for Title (assigned for this server control): home; page; company.

Metadata values for a content item’s Title metadata definition field: software; ektron; company.

If KeyWordValueMatchAll = true, content does not appear on metadata list because some items do not match.

If KeyWordValueMatchAll = false, content item appears on metadata list because one item (company) matches.

Data Type: Boolean

KeyWordValueSeparator

Enter the character used to separate the list of keyword values. An example is a semicolon(;).

Data Type: String

Language

Set a language for viewing the MetaDataList. This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Data Type: Integer

LinkTarget

Defines the way a link acts when a link is clicked.

Choices are:

_blank - This target causes the link to always be loaded in a new blank window. This window is not named.

_self - This target causes the link to always load in the same window the anchor was clicked in. This is useful for overriding a globally assigned BASE target.

_parent - This target makes the link load in the immediate frameset parent of the document. This defaults to acting like “_self” if the document has no parent.

_top - This target makes the link load in the full body of the window. This defaults to acting like “_self” if the document is already at the top. It is useful for breaking out of an arbitrarily deep frame nesting.

Data Type: ItemLinkTargets

MarkupLanguage

Identify the template markup file that controls the display of the metadata list. For example, mymetadatalistmarkup.ekml.

If the *.ekml file is located in the same folder as the Web form containing the server control, just enter its name. If the file is in another folder, enter the path relative to site root. For example, \siteroot\workarea\customfiles\markup\mymetadatalist.ekml

See Also: Controlling Output with Ektron Markup Language and metadatalist.ekml

Note: If you enter a valid EkML file, the DisplayXslt property value is ignored. If the EkML file contains the [$ImageIcon] variable, the IncludeIcons property acts as True.

Data Type: String

MaxNumber

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 being occupied, 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 appear below the last item to help the site visitor view additional items. See example below.

Data Type: Integer

OrderBy

The order of the list to be returned.

Title - The title of the content block

ID - The content block ID number

Date Created - The date the content block was created

Date Modified - The date the content block was last modified

LastEditorLname - The last editor’s last name

LastEditorFname - The last editor’s first name

ContentRatingAverage - Business Analytics Content Rating

ContentViewCount - Business Analytics Content Views

Data Type: Ektron.Cms.Controls.CmsWebService.ContentOrderBy

Recursive

Whether to search sub-folders of the identified root folder. The starting folder is identified in the FolderID property.

Data Type: Boolean

SortOrder

Choose the order direction of the list, Ascending or Descending.

Data Type: String

SuppressWrapperTags

This property is set to false because Ajax uses <div> tags to rewrite the region around the tag. You cannot change the value to true.

Data Type: Boolean

WrapTag

Allows a developer to specify a server control’s tag.

The default is Span.

Span - The <span> tag is used to designate an inline portion of an HTML document as a span element.

Div - The <div> tag is used when you want to apply attributes to a block of code.

Custom - Allows you to use a custom tag.

Data Type: String

Retrieving the XML Structure of a MetadataList

Retrieving the XML structure of XML content allows for greater control over developing XSLs. The following is an example of how to retrieve the XML structure:

1. Open a new Web form.

2. Drag and drop a MetadataList server control onto it.

3. Set the KeyWordName and KeyWordValue properties.

4. Drag and drop a Textbox on the Web form.

5. Set the TextMode property to MultiLine.

Note: It is also recommended that you set the width of the text box to at least 400px.

6. On the code behind page, add the following line.

Textbox1.Text = Metadata1.XmlDoc.InnerXml        

7. Build the project.

8. View the Web form in a browser.

9. The XML structure of the MetadataList appears in the textbox.

For an additional example, see the MetadatList XML page on the CMS400Developer samples page. It is located at:

In a browser:

http://<site root>/CMS400Developer/Developer/MetaDataList/MetadataListXML.aspx

In the source code:

<site root>/CMS400Developer/Developer/MetaDataList/MetadataListXML.aspx and MetadataListXML.aspx.vb

Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.