What can you do with the CMS?

I thought it might be interesting to show one use case I came up with for the CMS.

On a couple of my websites, I have a large table of dimensions for the various products we manufacture. So I thought I would experiment with using the CMS to both manage this data and publish it. I would be embarrassed to show you how I have been handling this data; it has been a nightmare.

Now I simply encode all this data in the Frontmatter in an MD file and then use a collection to build out a nice-looking table with no effort on my part, other than assembling the initial data.

This is what the Frontmatter looks like.

NOTE: The one critical feature for my use case is the ability to encode SUPERCRIPTs into the values. Awesome!

Once I have all of my files and created a template for the output, the CMS then populates a table that is responsive and good-looking. See below.

This is how the template is being set up.

This makes my life so much easier, as now I don’t have to duplicate this on the sites where I use it. Once I have the MD files and template, I just add them to the sites, and they now look identical on both sites except for theme styling.

Plus, it now opens up all sorts of other enhancements, for instance, adding a thumbnail image of the template so the viewer knows what they are looking at visually as opposed to just the name.

The only comment I would add is based on what I have learnt from this testing. It is WAY easier to create and manage these MD files in Elements. Trying to do this with resource-based MD files would be a nightmare. Why, you might ask? Because every time you edit one of the external files, you then have to update it and then reintroduce it to the resources, which makes the workflow a pain. This could be eased by using remote resources, but when dealing with a lot of files, that is even more painful. The other alternative is if we eventually gain the ability to edit files directly from the resources, this problem would go away!

What is next? I need to investigate using arrays in the Frontmatter so I can encode a series of dimensions into a single file and then just iterate over each one. This would dramatically reduce the number of MD files. Something to investigate further, but I’m happy with the current approach.

What else would be needed to make this an even better solution? The ability to have a LOAD LESS button so that the user can collapse down a series after showing all of the dimensions.

Appreciate the example, thank you

And just like that I was able to enhance this to display a thumbnail along with the dimensions, for a visual clue as to the template involved.