Blog

Luis Majano

July 10, 2014

Spread the word


Share your thoughts

One of the newest features of ContentBox is the ability to define related content for Entries, Pages, and ContentStore objects. Whether it's simply rendering a list of related content links, or creating complex data relationships for use in custom development, the sky is the limit for how you can use this new feature within your ContentBox apps!

Defining Related Content

Adding related content to your content is simple. While adding or editing your content, simply open the Related Content management panel, click "Add related content" and choose from any of the published Entries, Pages, or ContentStore objects that appear. As you choose related content, the list of available content will automatically filter.

Linked Content

The Linked Content management panel shows you a handy overview of all the places that your current content is being used as related content in other places. For example, let's say you are have a "Services" page that is used as related content on the "About" and "Work" pages. When editing "Services", you'll see that "About" and "Work" show up in the Linked Content panel, indicating that they are using your current content. At any time, you can remove the link, which will remove the related content relationship. So whether you are adding related content to your content item, or wanting to manage how your content item is used as related content elsewhere, you can do it all from one place!

Related Content Widget

Included with support for related content is a new core ContentBox widget called Related Content. You can drop this into your content wherever you like (or use it in a layout) and it will render a list of related content.

NOTE: Only Page and Entry related content links will be rendered by the widget.

Developing with Related Content

For those who do custom development around content within ContentBox, the additions to the model for related content are very straightforward. Two new properties (relatedContent and linkedContent) have been added to the root content model. Once you have an instance of any content object (ContentStore, Entries, or Pages), you can simply use the getters for relatedContent and linkedContent to retrieve all the related and linked content for your instance. Both of these will return an array of content objects that you can interact with just as you would any other content. So whether you're creating your own custom "Related Links" widget, rendering related content alongside your main content, or doing some other awesome thing that we haven't even thought of yet, you have very easy access to interact with related and linked content in whatever way you'd like. Happy developing!

Add Your Comment

Recent Entries

ColdBox 7.2.0 Released

ColdBox 7.2.0 Released

ColdBox, a widely used development platform for ColdFusion (CFML), has unveiled version 7.2. Packed with compelling new features, bug fixes, and enhancements, this release is designed to empower developers by boosting productivity, refining scheduled task capabilities, and enhancing the overall reliability and efficiency of application development. This article will delve into the key highlights of ColdBox 7.2 and elucidate how these advancements can positively impact developers in their daily coding endeavors.

Luis Majano
Luis Majano
November 20, 2023
Into the Box 2023 Series on CFCast

Into the Box 2023 Series on CFCast

Excitement is in the air as we unleash the highly anticipated ITB 2023 series exclusively for our valued CFCast subscribers – and the best part? It's FREE for CFCast members! Now is the perfect time if you haven't joined the CFCast community yet. Plus, we've got an incredible End-of-Year deal that's too good to miss

Maria Jose Herrera
Maria Jose Herrera
November 20, 2023
Ortus Deals are Finally Here!

Ortus Deals are Finally Here!

The much-anticipated Ortus End-of-the-Year Sale has arrived, and it's time to elevate your development experience! Whether you're a seasoned developer, a tech enthusiast, or someone on the lookout for top-notch projects, Ortus has something special in store for you. Brace yourself for incredible discounts across a wide array of products and services, including Ortus annual events, books, cutting-edge services, and more.

Maria Jose Herrera
Maria Jose Herrera
November 15, 2023