Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-04-15 18:03:02

tasetta
New Member
Registered: 2012-04-15
Posts: 3

Inserting images in my entries

Hello all,

Brand new to CMS, and after headaches of trying to figure out Wordpress, Joomla!, I’ve settled on learning how to use Textpattern. I have to say I really like the simplicity so far and have actually gotten a simple blog page up, yay!

But I am a bit stymied at how to be able to include images (more than one). I see that I am supposed to include the url to the image inside the !‘s, but what is the url I am to use?

I have images uploaded under the images tab.

I have been searching plugins and such. And installing them under the admin>plugins tab but nothing happens.

I would not have imagined something this basic could be so hard to figure out.

Now am wondering if it is even possible to include images with text, or if Textpattern, as the name seems to indicate, focused mainly on dealing with just text?

I have been searching FAQ & forums under the Images category and not finding anything helpful yet, so thought I would start a post and ask.

Please help! I really don’t want to go thru the headache of having to learn a different CMS as I really like what I’ve seen here so far!

Offline

#2 2012-04-15 19:30:12

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,948
Website GitHub

Re: Inserting images in my entries

Hi and welcome.

There are a number of ways to include images. Number one, as you have found is to use Textile’s ! syntax:

!http://site.com/images/42.jpg!

That would embed the image with ID ‘42’ directly into your article.

You could also list the image IDs in the Article Image field like this:

42, 15, 28, 35

(twist down the panel in the left hand side bar to reveal the text box)

You would then be able to use the txp:images tag to show a gallery alongside your body text — perhaps in a sidebar if you wish. You can also use the Article Image field to hold image URLs if you wish, though it’s not widely used as far as I know.

The advantage to using the Article Image field is that you can put the code to display your gallery in a Textpattern Form (our name for a re-usable hunk of markup) and it will be used for every article. So if you put this in your default Form:

<txp:if_article_image>
   <txp:images>
      <txp:image />
      <p><txp:image_info /></p>
   </txp:images>
</txp:if_article_image>

then you would see all the images one after the other, along with any captions you have assigned, in every article. If you haven’t assigned any, the entire block is skipped because of the conditional tag.

There are also gallery plugins available, although most of them are not necessary these days unless you’re doing some very sophisticated stuff.

Finally, there are plugins that help you choose images and assign them to articles using a graphical facility instead of having to remember them by their ID numbers when listing them in the Article Image. Textpattern plugins will help if that’s the direction you want to go.

Hope some of that helps and gets you moving in the right direction. I’m sure others will provide hints and tips if you get stuck. Feel free to ask away here on the forum and we’ll do everything we can to get you moving with Textpattern.

Last edited by Bloke (2012-04-15 19:31:43)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2012-04-15 21:06:51

tasetta
New Member
Registered: 2012-04-15
Posts: 3

Re: Inserting images in my entries

Thanks very much. Your post has helped me understand a few more things. However I’m still not getting it to work.

Am I supposed to be uploading my images to the txp_img folder inside textpattern folder or to the Images folder?

Offline

#4 2012-04-15 21:12:50

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Inserting images in my entries

One further little detail, cause I assume tasetta hasn’t yet discovered the tagbuilder links in the Image panel: they’re all lined up properly there in the Tags column.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2012-04-15 21:14:29

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Inserting images in my entries

tasetta wrote:

Am I supposed to be uploading my images to the txp_img folder inside textpattern folder or to the Images folder?

OK, in this case my assumption makes sense. You upload your images via the Images panel, and they’re placed in the “images” folder by TXP. Don’t ftp them yourself, they should be in the database to ease your workflow and make working with TXPs image tags even possible.

Last edited by uli (2012-04-15 21:18:18)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2012-04-15 21:51:08

tasetta
New Member
Registered: 2012-04-15
Posts: 3

Re: Inserting images in my entries

Thank you so much Bloke & Uli!

Bloke, that bit of coding and the example url link helped, I copied and pasted it into my default page. It works now.

Uli, thank you for explaining how images upload works and opening my eyes to the tag builder links, I’d seen them but hadn’t realized what they meant until just now. I don’t know much (yet) about coding, tags, attributes, classes, but I know enough to know that this is going to come in really handy!

Offline

Board footer

Powered by FluxBB