Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-10-06 00:46:57
- jvbates
- New Member
- From: Brighton - UK
- Registered: 2005-01-11
- Posts: 8
Stop article images being wrapped by a paragraph
As above…
How can I stop an image added into an article via textile using <code>!imageurl!</code>
being wrapped by a <code><p></code> and seperated by a <code><br /></code>
My article contains
<code>blah blah blah content…
… more content blah blah</code>
But renders as
<code><p>blah blah blah content…</p>
<p><img src=“http://www.mysite.com/images/1.gif” alt=”“ /><br />
<img src=“http://www.mysite.com/images/2.gif” alt=”“ /></p>
<p>… more content blah blah</p></code>
Any help much appreciated.
Offline
#2 2006-10-06 00:50:39
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Stop article images being wrapped by a paragraph
Don’t put them on separate lines?
Offline
#3 2006-10-06 06:51:27
- jvbates
- New Member
- From: Brighton - UK
- Registered: 2005-01-11
- Posts: 8
Re: Stop article images being wrapped by a paragraph
If I put them on one line, then TP only renders one of the images, the other it renders as text
Offline
Re: Stop article images being wrapped by a paragraph
Are you using Textile? You should be able to do something like this:
<pre>
</pre>
Or, if the images were uploaded with TXP, use:
<code>
<txp:image id=“image id#” />
or
<txp:thumbnail id=“image id” />
</code>
Offline
#5 2006-10-06 17:23:31
- jvbates
- New Member
- From: Brighton - UK
- Registered: 2005-01-11
- Posts: 8
Re: Stop article images being wrapped by a paragraph
I’m using textile to insert the images using
<pre>
</pre>
But the outputted page code still wraps the <code><img src=“images/image1.gif” /></code> in a <code><p></code>. How do I stop this and get it just to output the image on it’s own?
Offline
Re: Stop article images being wrapped by a paragraph
Try this:
<code><div></code> <notextile> </notextile> <code></div></code>
Offline
#7 2006-10-06 21:08:25
- jvbates
- New Member
- From: Brighton - UK
- Registered: 2005-01-11
- Posts: 8
Re: Stop article images being wrapped by a paragraph
But a <code><div></code> isn’t any better that a <code><p></code>. What I what is just the image, with no wrapper.
Offline
Re: Stop article images being wrapped by a paragraph
Use the line that jm posted, but make sure you add a “space” at the beginning of the line. Starting a line with a space prevents it from being wrapped in a block-tag.
Offline
#9 2006-10-07 09:44:32
- jvbates
- New Member
- From: Brighton - UK
- Registered: 2005-01-11
- Posts: 8
Re: Stop article images being wrapped by a paragraph
Perfect!!! – Many thanks
Offline