Table of Contents

Textpattern Themes

This is a themes mechanism that evolved on the Textpattern support forum, the thread was entitled Theme mechanism for TxP 4.0.X. The forum thread was used to elicit thoughts from fellow users, and as a way to keep my notes somewhere for future reference.

Once I had a working mechanism, I created this wiki page to serve as an evolving mini how-to. In the process, I adapted an existing plugin to fit the new folder layout and converted a freely available XHTML web template utilizing the new themes mechanism. Along the way I encountered speed bumps in Textpattern's core code, no show stoppers, but some code changes would make the importing of themes seamless.

Mechanism

Folder Layout

Naming Conventions

hcg_templates

Installing a new template will be as easy as uploading a new folder to your website, going into Extensions → Templates and picking from a drop-down list.

hcg_templates is a modified version of mcw_templates. The _templates folder was moved from the /textpattern directory to the web root directory. This facilitates developing templates now and into the future, with no worries about the Textpattern core files moving and breaking your design.

Download

hcg_templates (Download hosted at txp:tag)

Installation

Features

CrystalX 1.0

CrystalX, a design by Nuvio

Download

crystalx-1.0.zip (37.5KB)

Installation

Theme Layout

Features

Extras

MistyLook 1.1

MistyLook is a ported template by TxP-Templates.

This template was used as proof of concept for the template mechanism, modified to use the _templates folder, before work began on CrystalX. Marcus did the heavy lifting on MistyLook, I just positioned it into place.

Download

MistyLook 1.1 (62KB)

Installation

Theme Layout

h5bp default template

A new default template for Textpattern by Phil Wareham

See it in action at philwareham.co.uk

Download

h5bp.zip (Download hosted at txp:tag)

Contents:

Installation

Support

Support thread at Textpattern

Core Code Findings

Things to keep in mind for a future templating system:

More finds at the end of the road:

Relevant forum threads:

Core Themes Status

Textpattern is mostly used by web developers, the end user base is rather small at the moment. I attribute the low user acceptance of Textpattern to the high barrier that exists for initially launching a TxP powered web site. The high user acceptance of other systems, I feel, is because it's so easy to pick a theme and start writing articles.

Most available themes for Textpattern are comprised of long instructions where copying from text files and pasting into the backend presentation pages is the method for installing the theme. Since we began talking about a theme mechanism at the support forum, some designs are now being packaged up with hcg_templates, making it easier for the end user.

The theme mechanism discussion began over two and half years ago, today we still don't have a core developer sanctioned method of dealing with user themes. Textpattern 4.2.0 was just released with the ability to have admin themes, logically you appeal to your largest demographic, but my hope is that we can reach a user themes consensus sooner rather than never.

Textpattern Templates

After waiting almost 4 years, I've decided to start making templates:

TXP Themes - Built upon the mobile-friendly Bootstrap framework

The mechanism will be the same as I've outlined on this page, since it's serving me well on my own sites. Should one day Textpattern have a core method to handle user themes, I'll gladly update my templates to be compatible.