Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#4 2006-10-06 07:12:44

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Stop article images being wrapped by a paragraph

Are you using Textile? You should be able to do something like this:

<pre>
alt text alternate text
</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

#6 2006-10-06 19:24:47

qrayg
Member
From: USA
Registered: 2004-08-27
Posts: 81
Website

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

#8 2006-10-06 22:21:14

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

Board footer

Powered by FluxBB