Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-03-16 16:07:23
- Dandruff
- Member
- Registered: 2007-03-16
- Posts: 18
txp:article_image as background
Hi there,
I’m trying to use the convenient article image tag to display it as a background.
Something like this:
<div style="background-image:url(<txp:article_image thumbnail="0"/>)">
Of course, it doesn’t work, since the output is something like:
<div style="background-image:url(<img src="image.gif" title="" alt="" height="" width="" />)">
How can I get rid of all the html tags and get only the image article url?
Thanks for help.
Offline
Offline
Re: txp:article_image as background
I think you have two options:
- Use upm_image (a more powerful image display that lets you use custom forms and I’m pretty sure that it lets you output just the URL of the image)
- Do it by using a custom field.
Last edited by maniqui (2007-03-16 16:21:07)
Offline
#4 2007-03-16 16:31:44
- Dandruff
- Member
- Registered: 2007-03-16
- Posts: 18
Re: txp:article_image as background
Thanks a lot, i’ll try this plugin.
Offline
#5 2007-03-16 16:55:34
- Dandruff
- Member
- Registered: 2007-03-16
- Posts: 18
Re: txp:article_image as background
yes!
<txp:upm_article_image><txp:upm_img_full_url /></txp:upm_article_image>
returns the article image url only. I always try to avoid plugins, but sometimes you have to!
Offline
Re: txp:article_image as background
Plugins are your friend. Do not fear them.
Shoving is the answer – pusher robot
Offline
#7 2007-03-16 17:22:03
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: txp:article_image as background
Plugins are wonderfull in this kind of cases.
Regards,
Joey
Offline
Pages: 1