Reverse detail from Kakelbont MS 1, a fifteenth-century French Psalter. This image is in the public domain. Daniel Paul O'Donnell

Forward to Navigation

Updating Textpattern and Solving a Rewrite Problem

Posted: Mar 29, 2017 18:03;
Last Modified: Mar 29, 2017 18:03

---

Just updated my CMS (Textpattern) to the latest version (6.4.2). I had to because the University just updated the PHP on the server and this broke the old install.

Everything worked great except for one thing: I could get it to work if I put the full URL to the index page in (i.e. http://people.uleth.ca/~daniel.odonnell/index.php); but it didn’t work if I just put in the top-level directory (i.e. http://people.uleth.ca/~daniel.odonnell/). Links to other pages also didn’t work.

The error I got came from Zope, the server. And it said that it it couldn’t find http://people.uleth.ca/People.

This looks like a rewrite error. After Googling around and experimenting, I found that the issue was in my .htaccess file, which is provided by Textpattern. Basically I did the following:

  1. uncomment #RewriteBase
  2. replace Path/To/Site (or similar) in the same line with the top-level directory for my site (i.e. what comes after people.uleth.ca, or, in my case /~daniel.odonnell
  3. save and reload
----  

How to do a table of contents in text pattern

Posted: Feb 19, 2014 15:02;
Last Modified: Feb 19, 2014 16:02

---

My teaching pages are served out using Textpattern, a relatively light CMS that uses textile wiki-like markup.

Because adding an excerpt by hand wrecks the syndication of this site through Wordpress to my other blog, I don’t usually add a text summary. Instead, I do something similar to the Wikipedia or Wordpress: I begin articles with an abstract like first paragraph, then include a table of contents, then have the rest of the body.

I used to make up these tables of content by hand, cursing all the time that Textile wasn’t XML. Then I discovered soo_toc, a Textpattern plugin that builds tables of contents dynamically. Joy!

Of course, now I need to remember to add the template that calls the TOC to each page (as I type this, I wonder if there might not be a simple variable I could develop that does this, but that’s for later). In the interests of remembering, here it is:

<div id="TOC">
   <txp:soo_toc label="Contents" labeltag="h3"/>
</div>

The only downside of this plugin is that you need to have IDs attached to every header you want to show up in the TOC. You add an ID in textpattern like this: h2(#IDREF). If you are in a rush, you can always just use (#A), (#B), (#C) (remember, IDREFs can’t start with a number in XML).

----  

Back to content

Search my site

Sections

Current teaching

Recent changes to this site

Tags

anglo-saxon studies, caedmon, citation, citation practice, citations, composition, computers, digital humanities, digital pedagogy, exercises, grammar, history, moodle, old english, pedagogy, research, student employees, students, study tips, teaching, tips, tutorials, unessay, universities, university of lethbridge

See all...

Follow me on Twitter

At the dpod blog