A Move in a TextPattern Direction - Monday 20th February 06
I have joined some other cool people by moving this site over to Textpattern. While this move hasn't been without incident, for the most of it I can say that this has been a fun move. There were several things that I wanted to keep the same during this move, and I can say that I have managed to do this.
"Cool URIs don't change"
What makes a cool URI?
A cool URI is one which does not change.
What sorts of URI change?
URIs don't change: people change them.
My first objective was to keep the URI’s the same. When I first built the system that this site had run from, one of the first things I had to decide was how the site was going to be structured. From this I designed the URI structure. As it was a home-brewed system it was easy for me to keep to my design. The design did mean that there would be no numbers of any kind being presented to the end user (I consider users being presented with identification numbers a needless confusion). This has also been the deal breaker in many systems when I have tested them in the past.
In my experience, current Content Management Systems have the URI structure inbuilt so it is very hard to truly customize it. If you want to produce an article (or blog entry) it should have the date followed by the article title. This is fine if you want to have your site organised by date. However, I do not.
When looking at the latest version of Textpattern it seems that you don't have to have any numbers in the URI. In-fact there is a built in option to have the URI's in the format "section/article". So number one on my check list: tick.
Templating in HTML
I wanted to produce this site using html. I will not go in to the reasons behind my html motives at this moment in time, so just accept it. Now any good CMS should separate markup from data. Allowing me to construct the markup to my taste (the same way markup should be split from style). Now, out of the box Textpattern produces xhtml so I was unsure how easy it would be to keep my html templates. It turns out that virtually everything can be customised the way I want it. I don't have to use any pre-made markup.
So next was to move my single template over so it could power a Textpattern system. I knew this would take the most work out of the move so I got myself a cup of tea and sat down. I opened the textbook (ok, its a wiki), and set to work. I pasted the tags in where I wanted the dynamic bits to go. I made a few extra forms, an extra page and finally pushed the big yellow button and it was done. It took me only a short amount of time and I was using Textpattern to produce pages that looked exactly as the old version did. Only two problems that were going to need a little detective work.
You mean it can’t do that?
I set about looking in the plugin directory and at the back of the cupboard I found two small plugins that would enable me to finish the make over. The last step was moving my content over which wasn't as hard as it sounds. After a days worth of tinkering I had moved my old home-brew over to a flashy new Barrel.
As I mentioned in the previous paragraph this move did require me to find two plugins. Why were these plugins required I hear you cry? Well anyone who has used Textpattern will tell you that the title tag is a little restrictive at best. Another decision I made when designing the original site was about the order I wanted the title to be. I wanted the 'e26' to be last, as when you have multiple tabs open in your web-browser 'e26' will tell you nothing of what is in that tab. The article title will though. So ob1_title was the first plugin I installed.
The second plugin I installed was mem_article_count. It enables you to have a list of the sections with post counts in the respective sections. I would have thought that this would have been a standard built in but I’m afraid this was not either. Fortunately, I found the plugin that makes light work and now my archive page is pretty again.
One of the most time consuming task for was to work out how to make static pages. This really was not as easy as it should be. Unfortunately, you can not just create a static page with Textpattern, everything has to be a section and then an article. I would have liked to post an article in to no section, then it would appear in the root directory, but no this was not possible. You have to create a section and then post it as a sticky. In my eyes this is just plain wrong.
Overall
Overall I am very impressed with how far Textpattern has come since I last tried to give it a whirl. I would recommend it to anyone who doesn't want to go down the standard blog route (as wordpress would probably be best for that). Textpattern requires a little more work for you to set up, however once you are up and going posting articles to sections it is as easy as pie.
While in the past when I have remade my CMS I claim it will increase my post rate, I truly think that this will. All of my input form always break, when I have made them in the past. This has removed the need for me to go bug fixing when they break. Instead I can just grab the latest version of Textpattern and push it up. With it all being that easy what is to stop everyone and their dog getting a web site?... Ohh, they already have.