Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-31 18:44:09

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

[textile] How to display code inside a post

I’m so embarresed to ask a question that I should know, but I couldn’t find the answer.

I’d like to disply both, HTML and Textpattern code inside an artice, and I tried < code > and < nonscript > and none of them worked.

Thank you.

Offline

#2 2009-10-31 18:58:27

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: [textile] How to display code inside a post

Using Textile, place

bc. 

in front of the code.


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#3 2009-10-31 19:32:17

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: [textile] How to display code inside a post

or < bc: > or [ bc. ]?

Because only bc. doesn’t work.

Offline

#4 2009-10-31 20:41:14

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: [textile] How to display code inside a post

bc. code here only does one line, but bc.. multiline code here does several lines of code. When you want to switch back to normal text, use p. marks the beginning of a normal paragraph.


TXP Builders – finely-crafted code, design and txp

Online

#5 2009-10-31 22:32:35

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: [textile] How to display code inside a post

Thnk you, but it works only for txp, not HTML and PHP

http://www.dazigned.com/blog/7/galeria-de-imagenes-en-textpattern

Offline

#6 2009-10-31 23:28:36

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [textile] How to display code inside a post

Malize wrote:

Thnk you, but it works only for txp, not HTML and PHP

It works for everything ;) Use it like this:

  • bc. and bc.. should always be preceded and followed by a blank line
  • always add a space (not a new line) between bc. and bc.. and the first line of the code
  • if your code contains blank lines, use bc.. and start the following paragraph with p.
  • if it doesn’t, use bc. (the code can contain more than one line, just not blank ones)

Offline

#7 2010-08-20 19:31:25

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: [textile] How to display code inside a post

Thanks, els, I think I finally got that :) (sometimes I’m a bit slow… :P)

Offline

Board footer

Powered by FluxBB