Textpattern tips, tutorials and code snippets

Turn off Textile in your article

Here is a simple tip for turning off Textile in your article. Having forgotten how to do this in the past, I thought it might be useful to note the three main methods for doing so. Which one to use depends on your needs.

The three methods

  1. Turn off Textile for your article
  2. Enter a space in the body
  3. Use .notextile

Turn off Textile

First up you can turn off Textile completely for your article by choosing Advanced Options from within the Write tab, and under Article Markup choose either Convert linebreaks or Leave text untouched. More info may be found on these options here.

Enter a space

If you need to enter some HTML directly in your article, and don’t want the HTML tags to be wrapped with <p> tags, you can enter a space before your HTML tags like so:

 <div class="class">
Some text
 </div>
some more text...

Use notextile.

If like me you find it easy to forget to enter a space or delete them by mistake, Textile features a handy tag – notextile.

notextile. <div class="class">
h3. Title
Some text
notextile. </div>
some more text...

My personal preference is the last method, because its tidy and a space is easily missed and/or deleted.

7 Comments Comment feed

May I add a fourth method, suitable to disable Textile for just a few words: The double equal sign.

It goes like this:

Look, Ma: No ==*Textile*==

This was a revelation to me. Thank you TXP forums!

heads up Jonathan – the second h3 should be “notextile.” with the period after the word.

Thanks Dave and Robert – I edited the h3. Robert, I saw that method on the main Textile page on Threshold State but it did not work for me – perhaps I missed that the double equal sign is only for a few words in a paragraph.

notextile.. will switch textile of until it is manually restarted e.g. via p. or hn. (from textpattern solutions)

Nice information

Thanks for this tip, is very useful!
I was looking for something like that some time ago.

Thanks Jonathan!

Do you mind if I quote you on my blog if I link back to your website?

Add a comment

Use Textile help to style your comments