Jeff Wallace
Sep 13, 2011
  4902
(4 votes)

Category Listing Dynamic Content Module

Based on CMS 6 R2

From time to time we receive requests for displaying listings based on categories.  Simple enough to code, right?

 

Allan Thraen recently posted a blog regarding using Page Providers to display an alternate navigation based on categories, with the idea in mind, that you could also use this same kind of functionality to create listings for things such as “Latest News” or something similar.  Great stuff!

 

Prior to this Joe Bianco and I had kicked around some ideas for a Dynamic Content module that would allow content contributors to create listings based on categories.   It seemed like before we could even finish our complete thoughts Jacob Kahn had already written the first round of code.  We discussed some additional possibilities which Jacob then applied.  Alas we have a nice usable and configurable “Content Listing” module. 

 

The basics of how to use this are as follows:

 

1) Create a new EPiServer page.

2) Select the Dynamic Content button on the rich text editor.

image

3) Select “Category Listing” from the drop down.

image

4) Select the “StartPoint” for the area of the tree structure where you want the module to begin searching categories.

5) Enter one-to-many category names that the listing will be based on. 

a) If a category exists in the system as you type it will be presented for you.  Simply select it.

image

b) If you enter a category that is not already present in the system, select the “+” button, and it will be added below the category control as well as to the category list in the backend.

6) Optionally enter a “Start” and “End” date to filter the items in the listing based on the “Start publish” date.  This is useful if you only want to list items that were published within a certain timeframe.

image

7) Select a “Sorting” order.

image

8) Select “ShowDate” if you want a date to be included in the listing.

9) Select “ShowPreviewText” if you want the preview text to be included in the listing.

image

 

Example result with “ShowDate” and “ShowPreviewText” selected:

image

 

Example result with “ShowDate” and “ShowPreviewText” NOT selected:

image

 

Download the EPiServer module file and use the install from a compressed file option.

Download the code.

 

Please note, this is intended as a starting point for you to customize for your project needs.  The code is provided “as is” without warranty or guarantee of operation.  Use at your own risk.  Good luck and enjoy!

Sep 13, 2011

Comments

Feb 3, 2012 02:39 PM

Awesome! Finally a use for Categories.

Christopher Willan
Christopher Willan Oct 11, 2012 03:33 PM

Brilliant use of categories, would definitely improve any 'related items' referencing. Would be extremely useful to do similar for documentation within the file manager.

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024