Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-04-18 11:41:35
- willmcclellan`
- New Member
- Registered: 2008-04-17
- Posts: 6
Re: Problem assigning images to articles
[Form: work-thumbs]
<txp:if_first_article>
[<txp:if_first_article>: true]
</txp:if_first_article>
<txp:category1 class="small italic" link="1" section="work" this_section="0" wraptag="p" />
<txp:category2 class="small italic" link="1" section="work" this_section="0" wraptag="p" />
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:permlink class="img-link">
--->1st image <txp:article_image thumbnail="1" />
</txp:permlink>
[article 6]
[Form: work-thumbs]
<txp:if_first_article>
[<txp:if_first_article>: false]
</txp:if_first_article>
<txp:category1 class="small italic" link="1" section="work" this_section="0" wraptag="p" />
<txp:category2 class="small italic" link="1" section="work" this_section="0" wraptag="p" />
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:permlink class="img-link">
---> 2nd image <txp:article_image thumbnail="1" />
[SQL (0.000336): select * from txp_txp_image as txp_image where id = 4]
</txp:permlink>
Ok this is what i got back from the tag trace.
Theres two images. The 1st one i added to the the article field with the image name so is not working, but the 2nd one i left with the id and is working as you can see: [SQL (0.000336): select * from txp_txp_image as txp_image where id = 4].
The 1st image isnt returning an sql statement, just: <txp:article_image thumbnail=“1” />
I don’t know how this helps, does this identify the problem?
Offline
Re: Problem assigning images to articles
If article_image is supposed to take the TXP image name someone should tell article_image that.
According to the code it fetches the image based on ID if it’s numeric otherwise it assumes a URL which it will insert in the src
attribute of the image tag.
Last edited by hakjoon (2008-04-18 13:42:19)
Shoving is the answer – pusher robot
Offline
#15 2008-04-19 03:50:59
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Problem assigning images to articles
You’re right. For some reason, I thought it worked the same way as image/thumbnail works. Since it doesn’t, it should be made to do so.
Offline
#16 2008-04-19 12:28:41
- willmcclellan`
- New Member
- Registered: 2008-04-17
- Posts: 6
Re: Problem assigning images to articles
So do we know what’s the problem then or if we can use the image name????
Offline
Re: Problem assigning images to articles
TXP currently doesn’t support using the image name with the article_image tag, so at the moment the documentation at Textbook is incorrect.
If we change this, I think we should allow relative URLs starting with ../ or / as well as full URLs to avoid conflicts during upgrades (because relative URLs do work in current TXP versions).
Offline
Re: Problem assigning images to articles
If my memory is right (which it often isn’t) originally it only took URLs. The use of ID’s was added later.
Shoving is the answer – pusher robot
Offline