Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Textile and manually inserted HTML tags
Hello folks,
just a simple question: is it possbile to insert HTML tags manually without having textile messing around with the content?
A little example: I want to use pre-tags in my article to display php-code or whatever, so I type:
<pre>
< pre >
function foo() {
return ‘bar’;
}
function foo2($bar) {
return $bar;
}
< /pre >
</pre>
What I get once the article is published is the following:
<pre>
< pre >
function foo() {
return ‘bar’;
}
< p >function foo2($bar) {
return $bar;<br />
}<br />
< /pre >< /p >
</pre>
Which is of course not what I want. (Strange, pre-tags seem to be supported by this forum which also uses textile I thought!?)
So does anybody have a solution? Thanks in advance.
Offline
Re: Textile and manually inserted HTML tags
Try the code
Textile tag.
< code >
some code
some code
some code
some code
< /code >
Other option: begin each line with a space. It will tell Textile not to parse that line.
Offline
Re: Textile and manually inserted HTML tags
begin each line with a space. It will tell Textile not to parse that line.
Beginning with a space only prevents auto-wrapping with paragraphs. And it had been a side-effect of implementation only, but I guess given how much it is used, I guess one couldd almost consider it a feature by now.
There is < code >
and < notextile >
and @, but I think some textiling is always taking place (like replacing double-undersocres with
em
etc.), so this may or may not be good enough for you.
Currently your options are:
- Either Turn off textile for the article
- Or use a plugin (I remember there is one that people are recommending for this, but can’t remember the name or the concrete functionality)
- or use my above mentioned tags, experiment and see if it is good enough for you.
(Yes, this is on the to-do list and will hopefully, eventually become easier.)
Offline
Re: Textile and manually inserted HTML tags
Thanks for your suggestions.
The textile-code-tag (at) behaves somewhat strange: it only works with one line of code. If the code contains one or more breaks, nothing will be put between code-tags and the at’s are visible.
Using html-code-tags (< code >) has just the same effect like any other html-tag (the effect I descriped in the beginning).
< notextile > also only works for one line of code.
Beginning every line with a space is also not really an option (at least for big code pieces) like turning textile off.
So maybe anyone remembers the name of the plugin mentioned by Sencer, I couldn’t find anything at textpattern.org.
Last edited by ezee (2006-01-11 13:29:14)
Offline
#5 2006-01-11 22:38:45
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Textile and manually inserted HTML tags
Try < pre > < code > ... < /code > < /pre >
.
Alex
Offline
Pages: 1