Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2013-04-08 09:22:47
- Szorstki
- Member
- From: Poland
- Registered: 2012-05-27
- Posts: 20
TXP images
Hi there, I’ve problem with images that I’ve never faced before on txp…
I am displaying an image in my form, just like that:
<txp:upm_image image_id="15"/>
<txp:images id="15" />
<img src="images/15.png" alt="Karty bankowe"/>
First line (with the plug-in) works on every page.
Second – don’t work at all, there is only alt text displayed…
Third, I was using always… work only on index page, on the sub-pages I get alt text.
Is anything wrong with third pure HTML way? Newest TXP, newest xampp-portable. Windows 7 if it matters.
Offline
Re: TXP images
Hi you have an extra “s” try
<txp:image id="15" />
txp:images is different than txp:image look ar documentation/wiki to see what each one do.
Cheers
Offline
Re: TXP images
Also as a side note, upm_image isn’t really needed any more. <txp:images />
handles pretty much everything that plugin did.
Offline
#4 2013-04-08 12:23:48
- Szorstki
- Member
- From: Poland
- Registered: 2012-05-27
- Posts: 20
Re: TXP images
Thanks a lot – I’ve just pushed ctrl+f in txp tag reference and images looked good for me :P txp:image works perfectly.
I also removed upm_image – I’m not up to date with plug-ins (plug-in repo needed ;) )
Offline
Re: TXP images
Szorstki wrote:
<img src="images/15.png" alt="Karty bankowe"/>
For this to work on sub pages, I would have thought that you needed to put:
<img src="/images/15.png" alt="Karty bankowe"/>
Which should force the URL to start at the root level of your site, rather than a pure relative link starting from the current URL.
Offline
#6 2013-04-08 21:46:38
- Szorstki
- Member
- From: Poland
- Registered: 2012-05-27
- Posts: 20
Re: TXP images
<img src="/images/15.png" alt="Karty bankowe"/>
Didn’t worked even on index – I’ve tried that and was confused.
Offline
Re: TXP images
Hi
use txp:image to output the image and then look at the source of your page in the browser (on firefox use CTRL+U) then look at the img src to see what is done that can gives you a hint where is the problem with your directory.
Cheers
Offline
Re: TXP images
Another option:
<img src="<txp:site_url/>images/15.png" alt="Karty bankowe"/>
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Pages: 1