Cosmic JS Blog Stay tuned for community news, company announcements and updates from the Cosmic JS team.

Building with the Content Editor in Mind


When building websites connected to a CMS, it is important that the content is structured as simply as possible for the end user to edit.  I call this user-first content development.   It benefits everyone – the content editor, the developer and the agency when the content editor is empowered with the easiest and most intuitive way to manage content.  This seems obvious, but this oversight happens all too often and results in confusion and ultimately a bad experience for the content editor.  When you build user-first, you are empowering everyone on your team to build the best possible product.

In this article I'm going to show you some basic ways to structure content for your websites that make content very easy to manage on the backend.   When you start with an easy-to-use CMS and structure your content intuitively, your content editor will be able to quickly and easily navigate through the CMS to edit content and will 
ultimately sing your praises.

Let's first look at a standard website layout.  For 99% of all websites you have the standard structure of Header, Main Content and Footer and it looks something like this:



When I look at the page layout above and consider how it will be managed in the CMS, I immediately translate this into two different object types: Global (items on all pages like the Header and Footer) and Page (Main Content).  In the Cosmic JS backend it will look something like this:



This is set up in a way that allows for easy communication with your content editor on how to edit the content on the pages of the website.  If they are looking to edit a page, they go into Pages. If they need to edit anything that is repeated across the entire website, they go into Globals.  For the developer, there's an easy way to scale Global items that will be reused across the site like logo, navigation, social links, etc.

Now let's say we want to add a hero image on the top of each page on the website.


Cosmic JS makes this really easy to do by using metafields.  To add a new metafield to all of our new and existing pages, we will go into our Object Type settings for our Pages and add an image metafield for hero.


Now each Page will have the image metafield hero available:


Let's say we also wanted to add the company's social links to Facebook, Twitter and LinkedIn.  This is really easy.  All we need to do is add a new Socials object in Globals and each social link will have its own text metafield.  It would look something like this:



As you can see, Cosmic JS makes it really easy to give your content editor the easiest and most intuitive content editing experience.  I hope you found these basic examples useful in getting started with user-first content development using Cosmic JS.  If you have any questions about how to further structure your content for easy handoff to content editors, please join our Slack channel, or reach out to us on Twitter.

You may also like


We've rolled out a few updates that were requested by members of our community.

In an effort to make the data modeling of Metafields even easier, you can now add Metafields at the top, bottom and inline between Metafields.

In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Brandon Reid, a JavaScript developer residing in Dallas, Texas who's currently Lead Developer at Simple Media. Brandon recently launched a new React / Node website on Cosmic for The Arnold Companies, an energy and aviation client. Follow Brandon on LinkedIn and GitHub, and enjoy the Q/A.

At the request of the Cosmic JS Community, new Multi-Bucket Pricing Tiers are now Available for teams. Introducing, Cosmic Clusters. 

A very interesting article was published to one of my favorite web dev blogs today. Where Content Management Systems Fit Into the Process goes into a discussion which I think is seldom in the limelight in the development community, what is the best process in connecting your site to a CMS?  The author Geoff Graham presents three options in building a dynamic, CMS-powered website:

Option 1: The CMS Comes First Method


Option 2: The All-At-Once Method


Option 3: The CMS Comes Last Method


Previously, when building sites using other CMS platforms I would prefer to use the "CMS Comes Last Method" because I would be able to work out a lot of bugs, change my mind and add new features in the static HTML/CSS build phase before pouring in the more time-consuming programming / CMS phase.  

But with Cosmic JS I can use any one of these methods and feel confident that I can easily make edits, change my mind and add new features to a CMS-powered website.  There's power and reassurance in flexibility and Cosmic JS offers the most flexible way to add content to your website.

Sign up to get a private beta invite to begin checking out how easy it is to add dynamic content to your website or app.

We hope you enjoy the new JSON Metafield to provide you even more flexibility for storing application data for your Cosmic-powered applications.