The last article I wrote here was a tutorial of how to apply an admin-side theme to Textpattern CMS. If you want to change the front-end appearance of your Textpattern-powered Arvixe website, the approach is somewhat different. There is much more control and granularity over what your front-of-house operations can look like. Depending on your background and experience with content management systems generally, you may want to use a pre-made Textpattern theme in place of building your own, either from scratch or around a framework like Foundation or Bootstrap.
There are a number of places to find pre-made Textpattern themes. You should be aware, though, that they are not commonly found on commercial theme sites like Template Monster or Theme Forest, and there are comparatively far fewer available compared to more widely-used systems like WordPress. There’s nothing to stop you building your own theme, of course: Textpattern presentational components (pages, forms and styles) allow for just about any markup you’d like to use, but in my experience it’s useful to see how Textpattern processes each of the components before you start making your own.
The process for applying a front-end theme in Textpattern is, at a high level, a manual process involving copying and pasting code into a browser, then clicking Save. There are some themes that can be applied by other routes, including installing the whole thing as a plugin that writes all the presentational elements for you, but it’s a useful skill to know about how the components plug together, so I’ll show you this manual way. In this example, and in most instances, Textpattern themes are archive downloads containing multiple text files, sometimes with accompanying images and plugin files.
Applying a theme is a process that should be done in one session, especially if you have a live website that you’re dealing with. Allow yourself time and patience to copy the text over and you’ll get through it. If you’re moving away from the default front-end theme on Textpattern, currently the Hive theme, then you’ll be overwriting this code in your administration panel. If you get something wrong, or want to rollback to the known-good Hive theme, you can copy and paste the presentational elements from here:
Before you start, I recommend you take a backup of your Texpattern database. The database contains your content, presentational elements, settings and other useful things, so keep a copy in a safe place before you start applying a theme. Textpattern themes are generally pretty stable, but some problems can occur; having a backup away from your web server is good practice, regardless of your Textpattern competency. Personally, I take a full backup of all my web server files every week and the database every three days. I trust my web hosting company to look after my server, but bad things can happen and on occasion these are outside of the control of the hosting company. Be safe.
Each theme is, by nature, different. Each author builds the file name and structure in their own way. There isn’t, as yet, a defined standard for theme packaging protocol, but the core Textpattern code uses this format at present:
forms/ default.article.html foobar.misc.html pages/ articles.html default.html error_404.html error_default.html styles/ default.css README.textile
That is, each presentational element has its own folder (forms, pages, styles) inside the archive and the files are named accordingly, indicating the type where appropriate. We can tell from forms/foobar.misc.html that the file is a form called foobar with a type of misc. For each theme download, files will be structured and named accordingly. In most cases, there is an accompanying instructional read me file. From there, it's simply a case of following the instructions for installing the theme, which typically involves a bunch of copying and pasting of presentational elements, along with uploading some images and perhaps changing some settings on your website.