Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-03-03 10:31:53
- pepebe
- Member
- From: Mannheim, Germany
- Registered: 2005-02-07
- Posts: 74
Problem with <txp: article_image> and Thumbnails
Hi there, it’s been a long time, but I’m back and very pleased to see, that txp developed so extraordinary well!!!
Working on a new project, I have discovered a strange behaviour…
I have created a form named “Show Article”
<code><div class=“textbox”></code>
<code> <div class=“h1”></code>
<code> <txp:title /></code>
<code> </div></code>
<code> <div class=“articleimage”></code>
<code> <txp:article image /></code>
<code> </div></code>
<code> <div class=“textbody”></code>
<code> <txp:body /></code>
<code> </div></code>
<code></div></code>
Whenever the form is called it should display
*a title
*a picture
*a text
I wrote an article and whitin “Write” – “Advanced Options” – “Articel Image” I have entered the corresponding image number:
“12”
I was happy to see it worked. :)
But now I thought it would be a nice idea to see a thumbnail of the picture belonging to that article.
Textpattern Help told me:
Upload Thumbnail
Full-size images can be assigned their own thumbnails. These are useful for linking to and indexing full-size images.
A reference to the thumbnail is exactly the same as the reference to the full-size image, with the addition of ‘t’ to the filename.
For example, to reference a thumbnail associated with a fullsize image stored at
/images/12.jpg
…you would use
/images/12t.jpg
Here we go, I thougth and entered
…
“12t”
…
in the article image textfield and saved the whole thing.
But instead of a thumbnail I got:
NOTHING!!!
Well there IS a thumbnail with this name, but txp somehow ignores my command.
View Source shows me, that txp created
<code><img src=“12t” alt=”“ /></code>
instead of
<code><img src=“path_to_my_website/images/12t.jpg” height=“100” width=“150” alt=“Thumbnail1” /></code>
Anyone out there who can tell me what’s wrong?
Greetings,
pepebe
Offline
#2 2006-03-03 20:35:36
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problem with <txp: article_image> and Thumbnails
It doesn’t work like that because the txp:article_image tag looks for the id of the image in the database. Thumbnails are not stored in the same way, they are just a field in the images table.
Until now there is no txp:article_thumbnail tag, but fortunately there are a couple of plugins, like wet_article_thumb, that can do what you want.
Offline
#3 2006-03-05 08:57:09
- pepebe
- Member
- From: Mannheim, Germany
- Registered: 2005-02-07
- Posts: 74
Re: Problem with <txp: article_image> and Thumbnails
Thanks for your reply doggiez.
So I was wrong about the thumbnail thing. Anyway, wet _article_thumb was just what I was looking for (and much more…).
Nevertheless, I really think there should be a plugin-free way to do it.
Writing 12t instead of 12 in the “article image” textfield – or even better: <code><txp: article_image thumb=“1” /></code> – should be the proper way to do it.
Perhaps in a future release?
Until then, I have to resort to that plugin.
Greetings,
pepebe
Offline