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

Ortus June 2024 Newsletter!

Ortus June 2024 Newsletter!

Welcome to the latest edition of the Ortus Newsletter! This month, we're excited to bring you highlights from our sessions at CFCamp and Open South Code, as well as a sneak peek into our upcoming events. Discover the latest developments in BoxLang, our dynamic new JVM language, and catch up on all the insightful presentations by our expert team. Let's dive in!

Maria Jose Herrera
Maria Jose Herrera
June 28, 2024
BoxLang June 2024 Newsletter!

BoxLang June 2024 Newsletter!

We're thrilled to bring you the latest updates and exciting developments from the world of BoxLang. This month, we're diving into the newest beta release, introducing a new podcast series, showcasing innovative integrations, and sharing insights from recent events. Whether you're a seasoned developer or just getting started, there's something here for everyone to explore and enjoy.

Maria Jose Herrera
Maria Jose Herrera
June 28, 2024
BoxLang 1.0.0 Beta 3 Launched

BoxLang 1.0.0 Beta 3 Launched

We are thrilled to announce the release of BoxLang 1.0.0-Beta 3! This latest beta version is packed with exciting new features and essential bug fixes, including robust encryption functionality, enhanced Java interoperability, and more efficient event handling. Key highlights include the introduction of query caching capabilities, seamless coercion of Java Single Abstract Method (SAM) interfaces from BoxLang functions, and support for virtual thread executors. So, let’s dive into the details of what’s new in BoxLang 1.0.0-Beta 3 and how you can start leveraging these updates today!

Luis Majano
Luis Majano
June 28, 2024