Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-08-29 05:58:39

capatxp
Member
Registered: 2013-01-12
Posts: 21

Insert image into body

Hello, how might I insert a floated image into the body text?

like: this

I know I can do this in the article editing window, but I’d like to have this image in all articles automagically.

Thanks

Offline

#2 2013-08-29 08:27:13

etc
Developer
Registered: 2010-11-11
Posts: 5,394
Website GitHub

Re: Insert image into body

It depends on where you want it to be. Maybe, putting it in the article form before <txp:body /> with float:right style (and some margins) will suffice. If not, etc_query can insert it anywhere.

Offline

#3 2013-08-29 17:23:10

capatxp
Member
Registered: 2013-01-12
Posts: 21

Re: Insert image into body

I will try those, thanks!

Offline

#4 2013-08-29 17:50:19

capatxp
Member
Registered: 2013-01-12
Posts: 21

Re: Insert image into body

Well, I tried what you said and it worked perfectly. I edited the default form so <txp:image id=“5” class=“align-right” />
appears before <txp:body />.

Sorry for the inane question :) I’ve floated images like this many times with static html stuff I’ve done … I assumed that it wouldn’t work without it being inside the body tag for some reason. I thought it would just wind up floating above the body text since it wasn’t actually inside the article text. Derp.

Thanks for your help. Chris.

Offline

#5 2013-08-29 20:49:13

etc
Developer
Registered: 2010-11-11
Posts: 5,394
Website GitHub

Re: Insert image into body

capatxp wrote:

Sorry for the inane question :)

It took me some time to realize that most of <txp:tags /> are just HTML code, glad to see I’m not alone :)

Offline

#6 2013-08-29 23:52:18

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: Insert image into body

You could also just put this directly into the article if using textile <txp:image id=“5” class=“align-right” />

Offline

Board footer

Powered by FluxBB