FAQ: Features and Limitations
Widows and no_widow
Why does Textpattern insert a non-breaking space (
) between the last two words of my article titles?
sIFR won’t work properly on my article titles.
For those who don’t know, in typesetting, a widow is a single word on a line by itself at the end of a paragraph and is considered bad style.
The solution is to insert a non-breaking space between the last two words of your headline.
Widow handling in Textpattern
Textpattern includes such a feature in the core to deal with widows. There is a preference, “Prevent widowed words in article titles?” and several tags, such as
recent_articles, make use of this preference as the default value for the attribute,
What kind of web sites does Textpattern do best?
Why should I use Textpattern?
How does Textpattern compare to other weblog/cms applications?
What does Textpattern do well?
We receive many questions about Textpattern’s strengths and limitations. Textpattern is best suited for web sites that require several — though not necessarily all – of the following features:
- News or Weblog-style chronological articles, perhaps organized into several distinct departments or sections.
- Groups of articles organized by other means, like a FAQ, product catalog or portfolio.
- Single “static” pages, like an About or Contact page.
- Images; either attached to articles (as in a photoblog), or displayed in a gallery.
- File downloads.
- Structure, presentation and content maintained separately.
- Articles written by authors who don’t necessarily know HTML.
In other words, Textpattern is well suited for:
- News, magazine, tutorial and review sites
- Weblogs and photoblogs
- Web sites for businesses and non-profit organizations
- Online product catalogs
- Portfolio and professional sites
- Simple portals and file download sites
…or any web site that includes several of those characteristics.
You’ll find many fine examples of Textpattern sites on the Let’s See Yours, Then forum.
See also Can I use Textpattern to do this?
Will you add my code to Textpattern?
I’m planning on writing a fantastic new feature for Textpattern. Will you add it to the core if I send you the code?
What criteria do you consider when adding new code and features?
We accept most, but not all code that is submitted for inclusion in the Textpattern core. Sometimes we’ll accept part of a patch, or include a modified or abridged version.
Textpattern is open source, so you don’t need our permission to make your own modifications or extensions. However, if you want to maximize the chances it will be accepted and included in the official distribution, here is a quick guide to the Textpattern development philosophy.
Do the simplest thing that could possibly work.
Is there a shorter or easier way to achieve the same result? Then do it that way. Less code means fewer bugs.
Don’t reinvent the wheel. Is there already a function in PHP or Textpattern that makes your job easier? Use it.
Don’t try to solve a problem unless you’ve tested it. This is particularly important for performance enhancements: measure the speed before and after – is the improvement really significant? If not, the simplest solution might be to leave it alone.
Similarly, don’t write a bunch of functions or tag attributes on the assumption that they might be useful in the future. Unless you have a use case, leave it out.
Make it testable
This is the most important part. The development team won’t include your code in the core unless they’re confident they can support and maintain it – after all, they’re the ones who will receive the bugs reports and cries for help. The more you can do to help test your code, the better: examples of input and expected output, a test plan, notes on what you have and haven’t tested.
Scripted unit tests are becoming increasingly important in the Textpattern release process. You can make your code more testable by using a functional design with minimal coupling. A function that can be run in isolation, and returns a value based on its arguments, is easy to test. A function that prints output based on global variables, database records and configuration values is much harder to test. (Conveniently, Textpattern tag handler functions are usually easy to test).
Sure, we break our own rules sometimes. But, as a rule, we err on the side of simplicity.
Is Textpattern a CMS or a Blog?
Is Textpattern a CMS or Weblog application?
Opinions differ. The Textpattern developers believe that the distinction between “blog platforms” and “CMS applications” is mostly arbitrary: a weblog application is a CMS.
Textpattern is simple enough to be used as a weblog, and capable enough to be used as a CMS for business and news web sites.
Does Textpattern support Trackback?
Does Textpattern support Trackback or Pingback?
We investigated the possibility of supporting Trackback, and concluded that it simply can’t be done securely. Trackback is 98% pure spam, and there’s no way to secure it.
It would be relatively easy for someone to develop a Trackback plugin. There appears to be very little demand, however.
What languages does Textpattern support?
Can I write articles in my language?
Can I write articles in different languages?
Textpattern’s administrative interface has been translated to more than 40 languages – see below for a list.
You’re not limited to writing articles in those particular languages. Textpattern uses UTF-8, so you can write articles and create page templates in any language represented by Unicode. There’s no magic trick to this: just make sure your browser supports UTF-8, and write away. You can mix languages within an article — for example, quoting some French text in a German article, or using characters from other languages in an English article, as demonstrated in the list of languages below.
Textpattern doesn’t directly support articles with multiple translations. You can use sections or categories to organise a multilingual site. If you use one section to represent each language, you’ll be able to assign a specific template and/or CSS stylesheet to each, which might be helpful if some languages have specific layout requirements. If you’re already using sections for your site structure, create categories to represent languages.
To use a language with right-to-left text direction, such as Arabic, you’ll need something like this in your CSS stylesheet:
direction : rtl;
Textpattern translations as of 4.0.7:
- جزائري عربي
- Bosanski (Bosna i Hercegovina)
- English (Great Britain)
- English (United States)
- Bahasa Indonesia
- 한국말 (대한민국)
- Português (Brasil)
- Português (Portugal)
- Tiếng Việt (Việt Nam)
Can I make an image gallery?
If you want to display images with descriptions or comments, see Can I use Textpattern for a photoblog?
You can construct a simple image gallery like this:
1. Copy the default page template. Call it gallery. Find the main content block, remove any
<txp:article.. /> tags, and replace it with something like this:
<txp:image_index wraptag="div" break="" />
You can use the standard
class attributes to control the layout.
2. Create a new section named
gallery. Set Uses page to gallery.
3. Create one or more new image categories in textpattern > content > organise.
3. Upload some images via textpattern > content > images. Make sure each one has a thumbnail – you can use the create thumbnail feature – and assign it to one of your image categories.
http://example.com/gallery/?c=mycategory (or http://example.com?s=gallery&c=mycategory@ if you’re using Messy URLs). You can click on each image thumbnail to view the associated image.
There are several plugins that provide more complex gallery features.
Can I mix blog, static, and gallery pages?
Can a Textpattern site mix different kinds of pages? Static, weblog, image gallery, photoblog, portfolio, etc..
Yes. The usual way to do this is to use a separate section for each type of content – for example, a
news section for your weblog-style content, a
photoblog section for images, and a few sections named
contact and so on for “static” content.
Each Textpattern section can have its own page template. Create one page template for each type of layout (weblog, image gallery, static), and assign the template to each section as appropriate. Then simply post articles and/or images in the appropriate sections.
Can Textpattern share a database?
Can Textpattern share a MySQL database with another application?
Can two separate Textpattern installs share the one database?
Yes. Set the Database Prefix to something unique when installing Textpattern.
For example, if you’re installing multiple Textpattern sites that share the one database, you might use
txp1 as the Database Prefix for the first site,
txp2 for the second, and so on.
Is there an article size limit?
What is the maximum size for a Textpattern article?
Is there a limit on comment size?
Textpattern uses a MySQL
mediumtext field for article bodies. This limits the maximum size to about 16 megabytes per article—including any HTML tags that form part of the article body, but not counting images or files, since these are stored separately.
You’re more likely to run into a PHP memory limit than reach the article storage limit. Some hosts set the PHP memory limit to 8 megabytes.
The limit on comment size is 64 kilobytes.
Does Textpattern support multiple weblogs?
Can I use one Textpattern install to manage multiple weblogs or sites?
You can achieve the appearance of multiple weblogs using sections – one section per weblog.
If you need complete independence between those weblogs or sites, or want to limit authors’ access rights to each weblog, you’ll have to use a separate Textpattern installation for each.
There are currently no plans to add multiple weblog support to Textpattern. We might add support for author access restrictions per section at some point, but there are no concrete plans on how that might work or when it might be available. Help is always welcome.
Is Textpattern search engine friendly?
Can I use Textpattern for SEO?
Yes. Textpattern employs many recommended usability and accessibility techniques, which are friendly to both users and search engines, right out of the box.
The default page template is clean, minimal xhtml, with CSS stylesheets linked externally. Textile automatically generates valid XHTML for page content.
Textpattern supports “clean” URLs on most systems (like the URL of this page,
http://textpattern.com/faq/120/is -textpattern-search-engine-friendly). Each article URL is unique, to avoid problems with duplicate content, and the URL title and page title can be set independently. Though pages are generated dynamically, from a spider’s point of view they are generally indistinguishable from static HTML.
Missing or deleted pages are handled correctly with a 404 response. There are no session IDs or cookie checks to interfere with seach engine spiders. The /section/id/title URL structure makes it easy to exclude specific sections with robots.txt.
Textpattern’s basic organisation tends to suit a flat, broad site structure, which is generally regarded as search-engine-friendly, rather than deep nesting, which can be harder for both users and spiders to navigate.
How are sections and categories different?
Sections are exclusive. Every article is associated with a section. An article cannot reside in more than one section.
A newspaper web site might have sections named “Politics”, “Sport”, “Weather” and so on.
Categories are a looser way of organising articles. An article can have up to two categories, and may have none. Categories may cross Section boundaries – that is to say, articles from several different sections can belong to the one category.
Following the newspaper example, categories might be used to organize articles into “Local”, “National”, “World” and so on.
Categories can be used independently (to list articles from all sections in the National category, for example), or combined with sections (to list articles in section Politics with category World).
For a more detailed explanation of how Textpattern organises content, read I’ve installed Textpattern. Now what?
How do I use custom fields?
Can I attach additional information to articles?
Textpattern’s custom field feature allows you to attach extra information to articles: prices, URLs, phone numbers, or whatever suits your application. It’s not a substitute for a full-fledged, custom-designed database, but works well for simple designs.
Each article can have up to 10 custom fields. Each custom field can contain a simple string, limited to 255 characters.
Let’s say we want our Textpattern articles to have an extra field, representing a manufacturer name.
First, we need to set the field name. Under textpattern > admin > preferences > advanced, set Custom field 1 name to
manufacturer, and save the settings. It’s a good idea to use a name that is lowercase and contains no spaces.
Next, we need to add a tag to display the contents of the field. In your article form, add something like this:
<p>Manufacturer: <txp:custom_field name="manufacturer" /></p>
Finally, add the manufacturer name to each article. Under textpattern > content > write, click Advanced Options, and you should see a text input box with the title manufacturer. Add the manufacturer name there, and it will be displayed by the
<txp:custom_field .. /> tag.
Custom field names are global, but you don’t have to use them on every article. To display custom fields only for a particular section, either use a different page template and article form for that section; or wrap an if_section conditional around the
<txp:custom_field .. /> tag.
The txp:if_custom_field tag may also prove useful. It checks the value of a custom field. For example, to hide the “Manufacturer:” text on articles that have no manufacturer name:
<p>Manufacturer: <txp:custom_field name="manufacturer" /></p>
You can also use custom fields to store URLs. For example, if we added a second field,
<p>Manufacturer: <a href="<txp:custom_field name="manufacturer_url" />"><txp:custom_field name="manufacturer" /></a></p>
For more information, read txp:custom_field.
Can I use Textpattern for a photoblog?
Sure. Textpattern has an Article image feature, which lets you attach a photo to each article.
All you need to do is use an article form that includes the
<txp:article_image /> tag. Each time you want to post a new image, create a new article with the image attached.
You can manage the images themselves using Textpattern’s image upload feature, or upload them yourself using FTP if you’d prefer.
For more detailed instructions, read Creating a photoblog with Textpattern.
How do I back up Textpattern?
Does Textpattern have a built-in backup function?
How do I move Textpattern from one server to another?
Currently, there is no built-in backup or export function in Textpattern. You can use several tools designed for the purpose:
phpMyAdmin is supplied by most web hosts. The phpMyAdmin FAQ has a brief explanation of how to back up and restore.
mysqldump generates SQL backups that can be restored using phpMyAdmin or with the mysql command-line client. See the MySQL manual for details.
rss_admin_db_manager is a Textpattern plugin that includes backup and restore functions. Read more here.
If your server runs Unix, and has a cron function, here’s a sample crontab entry for an automatic weekly backup:
0 0 * * 0 mysqldump -Qc -u mydbusername --password=mydbpassword mydbname | gzip > $HOME/txp_backup-`date '+%Y%m%d'`.sql.gz
If you don’t know what a crontab is, or how to test one, we recommend instead using one of the other options listed above.
AutoMySQLBackup is an open source Unix shell script which automates the process of rotating daily, weekly, and monthly MySQL backups.
The remark regarding crontabs applies here as well.
When will the next version be released?
When is the next version due out?
When will feature X be added to Textpattern?
We don’t discuss release dates or speculate about upcoming features in advance, because such predictions are invariably incorrect.
Textpattern is an open source project. It is not developed in the same way as a monolithic, proprietary application. We don’t have a battery of programmers paid to obey orders. Textpattern’s developers – the core team, and occasional contributors – contribute code that they’ve written for their own projects and personal use.
This is not a bad thing: it means that the features added to Textpattern have been developed based on needs, not conjecture; and have usually already been tested on live sites.
What does this mean for your pet feature wishlist? The priority of the development team will always be with the things that are closest to completion. The more you can bring to the table, the more attention we’ll give in return.
You don’t have to be a software developer to help create a new feature: documentation, examples, test cases, and use cases will all help.
How fast is Textpattern?
Do I need to install a caching solution for my Textpattern site?
How do I improve Textpattern’s performance?
To the best of our knowledge, Textpattern is at least as fast as any similar weblog/cms package, and often several times faster. Out of the box, and running on modest server hardware, it can comfortably handle several page views per second (i.e. hundreds of thousands of hits per day).
Caching is normally of benefit only for web sites with very heavy traffic – in the order of many requests per second. You’ll find some information about caching here, including comparisons to other cached weblog packages.
On a fast server, Textpattern can serve dozens of hits per second without caching, and hundreds per second with caching installed .
Though there are several articles floating around that describe some methods of optimizing Textpattern’s performance, most of these were written for older versions of Textpattern. Our experience is that most of these optimizations make no significant difference in real-world tests, and some actually degrade performance.
If you’re experiencing performance issues due to sudden heavy traffic (such as a slashdotting), you can temporarily reduce the server load by setting “Logging” to “None” (textpattern > admin > prefs). Under normal circumstances, this has no significant performance benefit.
. Source: TextDrive weblog, Sencer’s caching plugin for textpattern is snazzy.
How many articles can Textpattern handle?
Can Textpattern run a site with thousands of articles?
How many articles can Textpattern handle before it becomes too slow?
Is there any limit on the number of articles or pages?
There is no limit on the number of articles Textpattern can cope with. Many sites use Textpattern to manage thousands of articles without any problems.
Performance is not dependent on the number of articles. Textpattern is very fast, and there is normally no noticable difference in speed between a site with a dozen articles, and one (on the same server) with thousands of articles.
Textpattern does not have a “rebuild” process, so posting or editing an article is just as fast for your 10,000th article as for the first one.