Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Ektron – DMS Content List

Posted on October 31, 2014October 26, 2015 By David Kittell
<%@ Page Title="" Language="C#" CodeFile="DMSFileList.aspx.cs" Inherits="DMSFileList" %>

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<meta charset="utf-8" />
	<title>DMS File List</title>
</head>
<body>
	<form id="form1" runat="server">
		<asp:Repeater ID="subContentRepeater" runat="server">

			<HeaderTemplate>
				<table style="border: 1px solid #000000;">
					<tr>
						<th>ID</th>
						<th>Type</th>
						<th>QuickLink</th>
						<th>Title</th>
						<th>Summary</th>
					</tr>
			</HeaderTemplate>

			<ItemTemplate>
				<tr>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "Id").ToString() %>
					</td>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "Type").ToString() %> -
						<%# DataBinder.Eval(Container.DataItem, "SubType").ToString() %>
					</td>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "QuickLink").ToString() %>
					</td>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "Title").ToString() %>
					</td>
					<td style="vertical-align: text-top;">

						<%# DataBinder.Eval(Container.DataItem, "Teaser").ToString() %>
					</td>
				</tr>
			</ItemTemplate>

			<AlternatingItemTemplate>
				<tr style="background-color: lightgray;">
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "Id").ToString() %>
					</td>
					<td style="vertical-align: text-top;"><%# DataBinder.Eval(Container.DataItem, "Type").ToString() %> -
						<%# DataBinder.Eval(Container.DataItem, "SubType").ToString() %>
					</td>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "QuickLink").ToString() %>
					</td>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "Title").ToString() %>
					</td>
					<td style="vertical-align: text-top;">
						<%# DataBinder.Eval(Container.DataItem, "Teaser").ToString() %>
					</td>
				</tr>
			</AlternatingItemTemplate>

			<FooterTemplate>
				</table>
			</FooterTemplate>
		</asp:Repeater>
	</form>
</body>
</html>

using System;
using System.Web;
using System.Web.UI;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using Ektron.Cms;
using Ektron.Cms.Common;
using Ektron.Cms.Content;
using Ektron.Cms.Framework.Content;

public partial class DMSFileList : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
		// Define Folder ID
		long folderID = 2147483941;

		ContentManager contentManager = new ContentManager();
		Ektron.Cms.Content.ContentCriteria criteria = new Ektron.Cms.Content.ContentCriteria();
		criteria.OrderByDirection = Ektron.Cms.Common.EkEnumeration.OrderByDirection.Ascending;
		criteria.ReturnMetadata = true;

		//	Only show content in the specific folder ID
		criteria.AddFilter(ContentProperty.FolderId, CriteriaFilterOperator.EqualTo, folderID);

		// Only Show Published documents
		criteria.AddFilter(ContentProperty.Status, CriteriaFilterOperator.EqualTo, "A");

		// Only show DMS documents
		criteria.AddFilter(ContentProperty.Type, CriteriaFilterOperator.EqualTo, 102);

		criteria.Condition = LogicalOperation.And;

		List<Ektron.Cms.ContentData> contentList = contentManager.GetList(criteria);

		#region Available Values
		/*
		 * Content ID = Id
		 * Folder ID = FolderId
		 * Folder Name = FolderName
		 * Quick Link = QuickLink
		 * Type of content = Type
		 * SubType of content = SubType
		*/
		#endregion Available Values

		subContentRepeater.DataSource = contentList;
		subContentRepeater.DataBind();
	}
}
Originally Posted on October 31, 2014
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

C# Ektron Code Ektron

Post navigation

Previous post
Next post

Related Posts

Azure – MSSQL Server Information

Posted on May 13, 2016

Same as MSSQL Server Information but is specific to what will work in Azure — Basic Information SELECT @@Servername AS [Server Name] –,@@ServiceName AS [Service Instance] ,Name AS [Database Name] ,create_date AS [Service Started] ,DATEDIFF(s, create_date, GETDATE()) / 86400.0 AS [Days Running] ,DATEDIFF(s, create_date, GETDATE()) AS [Seconds Runnig] ,@@VERSION AS…

Read More

C# GetData DataSet Function

Posted on May 21, 2015October 26, 2015

Great for populating just about anything you can databind. using System.Configuration; using System.Data.SqlClient; using System.Data; private DataSet GetData(string query) { SqlCommand cmd = new SqlCommand(query); using (SqlConnection con = new SqlConnection(connString)) { using (SqlDataAdapter sda = new SqlDataAdapter()) { cmd.Connection = con; sda.SelectCommand = cmd; using (DataSet ds = new…

Read More

PowerShell – Backup / Restore IIS Site and Configuration

Posted on November 10, 2015June 8, 2017

<# .SYNOPSIS This script will archive IIS App Pool and IIS Sites .DESCRIPTION This script will archive all App Pool and IIS Site settings and configurations. This script will also allow the restore of the App Pool and IIS Site settings and configurations. .PARAMETER Path .PARAMETER LiteralPath .Example IISBackup.ps1 1…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes