How to write to text pattern
This document is a quick primer on using TextPattern, the Content Management System that controls my web pages. It covers the basics only.
Contents
Log in
After I have made you an account, you should receive login information in an email. I generally use your uleth username and email address.
You can log in in two different ways:
- Browse to my webpage (http://people.uleth.ca/~daniel.odonnell/), scroll to the bottom of the screen, and click on “Site Administration”;
- Browse directly to the site administration page: http://people.uleth.ca/~daniel.odonnell/textpattern/index.php
The first time you are there, you will see a login form. If you have previously checked the “remember me” box, you will go straight to the “write” screen.
Write screen (New article).
The “write screen” is the opening screen after login. This is where you write new entries.
The important thing when you compose a new article is to make sure it is the right section (under “Sort and Display”, bottom right box). The default is teaching, but “Blog” or “Tutorial” is often a better choice. This needs to be set correctly because it becomes part of the URL and is troublesome to change.
Adding Keywords (bottom right box) is also handy at this stage, but it can be added or changed later.
“Articles” Screen (Choose an existing article)
If you want to edit an existing article, choose the “Articles” tab. This takes you to a list of previous entries, sorted by default in reverse order of composition. If you need to find an entry, you can use the search box to search by title or content.
When you’ve found an entry, clicking on it will open the article in the “write” screen.
Coding tips.
Textpattern using the “Textile” markup system. This is a wiki-like or markdown-like system that uses symbols instead of HTML codes. There are some common patterns listed in the top left box on the “write” screen. But here’s a primer of the really common ones:
- Bold text:
*Bold text*
Text between asterisks is rendered bold.
- Italic text:
_Italic text_
Text between asterisks is rendered italics.
- Hyperlinked text:
"Hyperlinked text":http://example.com
To add a link to text, put the text you want to form the link (i.e. the text a user will click on) in quotation marks followed by a colon and then the URL with no spaces.
- Headers: Headers appear on their own line preceded by
h1.
for top-level headers,h2.
for second level,h3.
for third, and so on. I useh3
as the top level for subheadings within an article, because h1 and h2 are used by other parts of the page.- If you create an ID for the heading, it will appear in the table of contents. You do this like this:
h3(#someID). Heading text
. “someID” is the ID for the line. It should be unique within the document and must begin with a letter. The heading for this section, for example, is coded like this:
- If you create an ID for the heading, it will appear in the table of contents. You do this like this:
h3(#codingTips). Coding tips.
- Paragraphs: Paragraphs are indicated by a double return (i.e. a blank line). A single return shows up as a “line break”—i.e. a “soft return” or a new line without a blank line in between.
some text that ends a paragraph
Some text that begins a new paragraph
- Lists: Lists are separated from the text above and below by a double return (i.e. a blank line). Each item in the list begins with and asterisk and space (bullets) or number-sign and space (numbered list); items end with a single return. Two asterisks or two number signs followed by a space is a sub-entry. You don’t supply the numbers for a numbered list; the system counts the number signs.
* This is the first item in a bullet list
** This is a sub-item
* This is the next item
# This is the first item in a numbered list
## This is a sub-item
# This is item 2
- Table of contents: the following is the code to use for a table of contents; this will select all headers that have IDs:
<div id="TOC">
<txp:soo_toc label="Contents" labeltag="h3"/>
</div>
- Images: To put an image in the text, surround the URL with ! (e.g.
!http://example.com/image.png!
- Block quotations: Block quotations are preceded and followed by a blank line and begin the first line of text with
bq.
. For example:
some text that ends a paragraph
bq. Some text that begins a block quotation