Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-31 16:11:17

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Output @<txp:article_image />@ as URL only?

Does anyone know of a TXP tag/attribute or plugin that allows <txp:article_image /> to output only the full image URL, not the img tag?


Cheers,
Jon VC#9

Offline

#2 2006-08-31 16:25:56

mstwntd
Member
From: Melbourne, Australia
Registered: 2004-12-25
Posts: 52

Re: Output @<txp:article_image />@ as URL only?

Hi Jon,

upm_image (<txp:upm_img_full_url />)

Offline

#3 2006-08-31 18:59:32

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: Output @<txp:article_image />@ as URL only?

And if you need to pull the URL of the article image thumbnail, try using this:

<code>
http://domain.com/images/<txp:php>echo $GLOBALS[‘thisarticle’][‘article_image’];</txp:php>t.jpg
</code>

Last edited by reid (2006-08-31 19:00:34)


TextPattern user since 04/04/04

Offline

#4 2006-08-31 19:07:29

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Output @<txp:article_image />@ as URL only?

Thanks! I’d seen that plugin, but hadn’t picked up on the fact that it could do that!


Cheers,
Jon VC#9

Offline

#5 2006-08-31 22:16:21

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: Output @<txp:article_image />@ as URL only?

reid wrote:

And if you need to pull the URL of the article image thumbnail, try using this:

<code>
http://domain.com/images/<txp:php>echo $GLOBALS[‘thisarticle’][‘article_image’];</txp:php>t.jpg
</code>

Thats excellent, I really need to understand these globals. If only it didn’t rely on every image being a .jpg, it would avoid having to install a plugin.


Cheers,
Jon VC#9

Offline

#6 2006-08-31 23:40:47

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: Output @<txp:article_image />@ as URL only?

jonhicks wrote:

If only it didn’t rely on every image being a .jpg, it would avoid having to install a plugin.

I hate to make a generalization, but I just tried it on site I made thatr uses this technique, and at least on a TextDrive server … no extension was required. Find the url for one of your Txp-loaded images, delete the extension, and see if it loads on your server.


TextPattern user since 04/04/04

Offline

Board footer

Powered by FluxBB