Using Textpattern
Nov 15, 06:34 PM by Rich Webster
I’ve been setting up many clients with TextPattern and WordPress, and I’ve decided to make a sort of “users manual” for my clients within this blog. They’ll all be grouped under this address. This is the first such article.
Making Links in an Article, to another Article
There are two kinds of things you can do with a system like TextPattern (Txp):
- use dynamic linking, where Txp does the work for you
- do stuff just like Txp wasn’t there.
Linking to other TextPattern Content
Unlike old-fashioned web pages, the URL of a Txp web page provides the system — NOT with the location of a file — but with a command that goes to a database and pulls out the content of the page, and sticks it in a Template.
(FYI: It uses PHP to do this)
This kind of link is formatted:
http://www.richoid.com
/index.php?id=14
The blue part is the base information, and once you’re within the site, you can just ignore it (optionally) and just link to the other two parts:
The red part is actually a link to a set of programmatic instructions, which may or may not contain a web page. In TextPattern, it doesn’t, it points to a database, and gives instructions on what to do when it encounters…
The green part, which is an instruction to the server (signified by the ”?”)
In this case, the green part says “get the content stored at “id 14”. This is just the article you’re writing, to which it is referring. The rest of the page is defined by the “Template”. In Txp admin, you can view the template(s) under the “Presentation” tab -> “Pages” tab.
Question: So how do you know that particular page is found by calling ”?id=14”?
Answer: when you create the article, or edit it, you can see that the full address of the “write” tab when you are editing it, is:
http://www.richoid.com/textpattern/index.php?event=article&step=edit&ID=14
If you look at the very end, you see ID=14
There’s really a lot more to how these urls work, but in this case, if you make a standard html link:
<a href="">Link Text Here</a>
and put the address:
index.php?id="XX"
between the quotes like this:

and, finally, replace the XX with your article number, it should always present a standard page, with your particular article in it.
*Final tidbit: *
This probably deserves a longer discussion, but, briefly:
You can show all articles in a particular Category using a similar URL:
<a href="index.php?c="information_architecture"">Link Text Here</a>
You can show all articles in a particular Section using a similar URL:
<a href="index.php?s="About_Larry"">Link Text Here</a>
Use “Categories” to group articles that have related content, onto a single page, or if you want pages with substantially different layouts (in which case use “Sections” which can have different page templates)
BTW, one main advantage of Textpattern over Wordpress is that it is easier to accommodate multiple layouts in a single site. Wordpress requires a bunch of PHP “if” statements (i.e. programming… too complex for casual users) where Txp just lets you make any number of simple Templates, for each layout.
| del.icio.us | | Digg This | | Technorati |


