Creating a portfolio using Movable Type

Over the past few weeks or so I have set about using mt to add the portfolio
section to my web site. The main reason for this was that I wanted the search
to return folio results and also because I wanted one, consistent, site wide mode of development.

With a little help from google and a some very cool conditional MT plugins,
I have built something that will serve my purposes for the next little while, although I’m
sure I’ll want to continue tweaking it.

How do you solve a problem like Movable type?

The main problem I ran into, is that MT, a blogging platform primarily is by default set up with
the ability to have only one individual entry archive template. Given that my site is set up on a page per entry basis, this meant that
I was unable to differentiate between the various pages, sections of the folio or even between
blog entries and folio entries.

There had to be a way to use different templates for different categories, surely? And yep, there is!

This was problematic for a number of reasons but largely because, if a user were looking at the web
design section, I wanted to display a list of links to the web design
entries or if in the sketckbook section, sketchbook entries etc. I also wanted to differentiate between the folio and the other sections of the site.

There had to be a way to use different templates for different categories, surely? And yep, there is!

Multiple Individual Archive Templates. But How?

Google! After a bit of searching I came across nonplus where I found a solution for multiple archive templates using the
MTSuplemental Category Tags . I thought that this was too easy and it was. This solution
served to create different archives pages (this will come in handy later though), not actual individual entry templates.

A quick post to the sites comments and
stepan got back to me, pointing
me in the direction of the compare plugin written by Kevin Shay which was more suited to my needs.

Enter Compare Plugin

After installing the compare plugin, the basic premise was to set up
each template in its entirety as a new mt include. EG: web template, print template etc. You will also need to set up a category in MT for each section that you want to have its own template.

Then, using the conditional logic below on your individual
entry archive template, mt calls the correct template based on the category of your
entry.

<MTIfEqual a="[MTEntryCategory]" b="folio identity"><MTInclude module="archive folio identity"></MTIfEqual>
<MTIfEqual a="[MTEntryCategory]" b="folio illustration"><MTInclude module="archive folio illustration"></MTIfEqual>
<MTIfEqual a="[MTEntryCategory]" b="folio print"><MTInclude module="archive folio print"></MTIfEqual>

Using the first line of code as an example, it basically breaks down like this: if MTEntry Category = "folio identity" then use MTInclude "archive folio identity" which is really quite straight forward.

Templates

Now that I have a way of making multiple templates work, I simply need to create the templates as MT Includes. As all the templates are quite similar, I took my existing ‘individual archive entry’ template and modified the headings and menus for each section.

To make things easier on myself I did this in homesite and saved a copy out of each.

Once done, I simply pasted the entire template into a new template module for each section. Making sure however, that the name of the template module matched the name I specified in my conditional logic above for example:

  • archive folio identity
  • archive folio illustration
  • archive folio print
  • archive folio sketchbook
  • archive folio web

Indexes or Landing Pages

Given my site uses the suckerfish drop down menu system for the main and
second level navigation, I needed to create index pages for the various folio
sections. identity, illustration etc. and also an index for the portfolio landing page so that the pages underneath those were accessible.

Currently I have set up static indexes for each section that repeat the most
recent or featured entry. In addition I set up a main page linking to various
projects across all sections of the folio. This for the time being, seems to be a satisfactory solution, there are however, a couple of things
that could use work.

  1. The indexes, being effectively static content, aren’t indexed by the search.
    This, I’m hoping can be solved by using the archive template first mentioned
    at the top of the page. Need to look into this.
  2. There is some slight doubling up of content between entries and indexes,
    again, this could possibly be solved by the above.

I’m a designer rather than a technical person so my explanation may have fallen down here and there. Regardless, I hope it made at least some semblance of sense.

Tags:

Comments are closed.