Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-04-01 20:17:59
- Mirk
- New Member
- Registered: 2006-03-23
- Posts: 8
I want to use the <txp:image />-tag for uploaded images in my template
I found the <txp:image />
Tag in the Textbook Tag-Index.
In the Textbook I couldn’t find the image-Tag in the lists of:
1. Page (Template) Related Tags
and 2. Form Related Tags
I tried to use this tag in my template. It didn’t work.
My aim was to use an uploaded images for my template to make it nicer.
Which txp-tag can I use else? I searched in the support forum without results.
Does there exist a link to an explanation how I can integrate uploaded images in
the template???? Where can I use the <txp:image />
-tag ????
How to use articles, files and links is explained well in the textbool, but how to integrate the uploeded images beside the <txp:article_image />
-tag is unclear.
Thanks for any reply.
Mirko
(Edited to show code. – Els)
Last edited by els (2006-04-01 20:27:16)
Offline
#2 2006-04-01 20:19:31
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: I want to use the <txp:image />-tag for uploaded images in my template
<txp:image id="n" />
where n is the ID assigned to the image when it is uploaded.
-Kurt
kurt@kurtraschke.com
Offline
#3 2006-04-01 20:23:53
- Mirk
- New Member
- Registered: 2006-03-23
- Posts: 8
Re: I want to use the <txp:image />-tag for uploaded images in my template
Thanks for the quick reply. I ued the attributes id or name in the template already, after reading the eplanations about the txp-image-tag. But the using the txp-image-tag in the template the img-tag didn’t at all appear in the source-code of the page.
Offline
#4 2006-04-01 20:27:19
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: I want to use the <txp:image />-tag for uploaded images in my template
So the tag doesn’t generate any output at all? What shows up in the tag trace?
FAQ: Diagnosing template problems
-Kurt
kurt@kurtraschke.com
Offline
#5 2006-04-01 20:31:53
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: I want to use the <txp:image />-tag for uploaded images in my template
If you have uploaded an image (through content > images), and it has, say, id 2, <txp:image id="2" />
should output this html: <img src="http://yoursite.com/images/2.jpg" height="xxx" width="xxx" alt="Your alt text" />
.
Offline
#6 2006-04-01 20:41:53
- Mirk
- New Member
- Registered: 2006-03-23
- Posts: 8
Re: I want to use the <txp:image />-tag for uploaded images in my template
Sorry but I am stillin trouble:
I tied it with the default-template of txp. Here my changes in it:
<code>
<!— left —>
<div id=“sidebar-1”>
test_start <txp:image id“4” /> test_end
<txp:linklist wraptag=“p” />
</div>
<!— right —>
</code>
Here the result in the source of the page:
<code>
<!— left —>
<div id=“sidebar-1”>
test_start test_end
<p class=“linklist”><a href=“http://textpattern.net” title=“lauter infos”>informativ</a><br />
<a href=“http://127.0.0.1/susanne/Test” title=“super inhalt”>tolle seite</a><br /></p>
</div>
<!— right —>
</code>
My mpde is test and there are no warnings.
Thanks
(edited again. You can use @‘s or < code > < /code > tags (whithout the spaces) to show code. – Els)
Last edited by els (2006-04-01 20:48:17)
Offline
#7 2006-04-01 20:49:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: I want to use the <txp:image />-tag for uploaded images in my template
<txp:image id"4" />
should be <txp:image id="4" />
.
Offline
#8 2006-04-01 21:00:06
- Mirk
- New Member
- Registered: 2006-03-23
- Posts: 8
Re: I want to use the <txp:image />-tag for uploaded images in my template
It’s my fault. Thanks and sorry
Offline