Using Junecode for a site that isn't a blog

In reply to this entry, Nathan asked:

Had to give this a [go]. Some really slick stuff, and a nice simple admin interface, but would I be correct in assuming this is more intended as a “blogging platform” rather than a proper CMS? As far as I can see it’s all about posting entries, and there’s no apparent way of setting up pages, in a site tree, with possibly multiple areas on the page to edit.

Good question! It is designed around the basic concept of a blog editor, but it’s also designed to be flexible enough that it can be easily adapted to any type of site. Most of the sites I use it for aren’t blogs, actually. Anywhere Road is a good example on a non-blog site I’ve built using Junecode (complete with AJAX), and the old Tense Code site is another good one. It’s all a matter of how you set up your templates.

Each entry is a separate page. If you don’t want all those pages to appear in the main directory listing you simply mark them as hidden. This allows you to link to those pages however you choose. Alternatively you might want to list only the titles of those pages (for your sub-navigation, for example). To do that you leave the entries public, but alter the template to show only the titles and links. Here’s an example of that in use. Each part in the Ford GT sidebar is an entry.

For other types of sidebars you’ll want to use hidden entries as well. The Page field becomes important here. Here’s an example of what you might insert in your template:

<junecode:entries dir="journal/junecode" page="sidebar">
<junecode:entrytext />
</junecode:entries>

This snippet would look for an entry in the current directory (category) with the Page name “sidebar”, and insert its text. This example would give you the same sidebar for every page in a directory. If you wanted each page to have a different sidebar, you could change the first line to this:

<junecode:entries dir="journal/junecode" page="using-junecode-for-a-site-that-isnt-a-blog-sidebar">

In this case, a page named “sample” would look for an entry named “sample-sidebar” and display that page as the sidebar, if found. My own site is a good example of this in use. The “About Me” section on this page, and other sidebars throughout the site, are separate entries inserted this way.

Yet another way to do a sidebar—especially if it’s just a short bit of text—is to add a meta data field in the Options section of the site editor. That will give your entries a new field where you can enter the sidebar text. You can insert that text in your template like this:

<junecode:metadata name="sidebar" />

Those are just a few examples. You could also show an entry from one category on one area of the page, and list pages in a different category on another area of the page. There are a ton of different ways you can build up the page, depending on what you need to do.

This setup may not be the most intuitive, but I think some learning curve is unavoidable when you’re building a complex site with a CMS. My focus has been on removing a lot of the tedium that comes along with web design, without having to sacrifice the flexibility of building a site by hand. Of course the content needs to be easily editable by anyone as well, which is the main purpose of any CMS. I think I’ve accomplished these things pretty well… It has certainly made working on my own sites much easier, and my clients seem to get the hang of editing their sites very quickly. Even if I’m the one updating the site, I’m able to do it much faster with Junecode.

Eventually I’ll be including some themes with Junecode that are designed for common non-blog types of sites. Like a photography portfolio, or a band site. I’ll probably also put together some tutorials on how to handle customization options like the examples above. Further down the line I’m hoping to create a template generator that will allow you to create templates using drag and drop, which should bring that initial learning curve way down. That one is still a long way off, but it’s something I’ve been tinkering with for a while now.

Comments

This entry has one comment.

Nathan

Nathan wrote on August 31, 2008:

Thanks for covering that Mike. I’m glad that it’s something you’ve thought about, even if it isn’t the primary use. I definitely like the idea of themes aimed at that in the future, which even if someone wanted something different - would make a good starting point.

View more

Junecode

Showing the contents of an RSS feed with Junecode Someone asked me recently if it’s possible to subscribe to an RSS feed from a Junecode…

Introducing Junecode 3.0 (formerly Tense Code) After a year and a half of work, I’m excited to present the first beta of Junecode 3.0,…

Tense Code 3.0: a quick tutorial This entry is part of a series showing off the new features in Tense Code 3.0. Tense…

Tense Code 3.0: a new look and iPhone support This entry is part of a series showing off the new features in Tense Code 3.0. Tense…