Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-24 14:10:20

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

article image wont appear!

Hi, ive placed an image in my article. Its the first time ive ever done it and its worked kinda. Basically i think ive done it right but i get a broken link icon where the image should be when i test the site.

Basically ive put the txp:article image tag in my article form. Then ive uploaded an image in to the txp’s image directory, took note of the id txp has given it and then gone back to the write article and put the full extension in. This is as follows:

http://localhost:8888/textpattern/images/4.jpg

Ive put this in to my browser also to check the image is there and it is

Now when i view the page i get a broken link, ive definatley uploaded the image and got the correct id.

Could anyone suggest anything im doing wrong.

Offline

#2 2006-02-24 16:51:02

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: article image wont appear!

Double-check your site url in the admin prefs. What is the url to the image that Textpattern spits out in your rendered page?

Offline

#3 2006-02-24 17:06:58

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

Re: article image wont appear!

Why don’t you just put <strong>4</strong> in the article image field?

Offline

#4 2006-02-24 17:13:36

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: article image wont appear!

Oh! and I missed something else: elduderino, the article_image tag goes in your article form, not in your article itself.

Offline

#5 2006-02-24 17:46:47

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: article image wont appear!

Hey guys thanks forthe replies. I had put the article_image in the article form so i just went back and put a single didit four in the artcile image field and it worked!

I just didnt read the help jog thats next to the field properly!

Now could anyone tell me how i style this article image tag? want to give it some positioning properties. How do i do this?

Thanks for your time

Last edited by elduderino (2006-02-24 17:47:16)

Offline

#6 2006-02-24 17:55:40

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

Re: article image wont appear!

You can use the style attribute in the article_image tag. Or do something like this in your article form:
<code>
<div class=“image”>
<txp:article_image />
</div>
</code>
And style .image img in your CSS.

Offline

#7 2006-02-24 17:59:23

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: article image wont appear!

aha!

I understand thanks very much!

Offline

#8 2006-02-24 18:05:17

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: article image wont appear!

surely adding the style to the article image tag will mean that theres styling in the parsed html, making it impossible for code to validate?

Is this right? I cant check it because im not with the computer that my txp is installed on

Last edited by elduderino (2006-02-24 18:05:57)

Offline

#9 2006-02-24 19:46:32

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

Re: article image wont appear!

I didn’t try it, but I can hardly imagine that txp tags deliver html that doesn’t validate… But still, I would prefer to do the styling in the CSS.

Offline

#10 2006-02-24 19:51:59

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: article image wont appear!

The code output will still validate should you choose to use the style attribute.

Offline

Board footer

Powered by FluxBB