Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
txp:image index / txp:image display not working
In regards to http://www.andcuriouser.com/current/gallery/?c=Video-thumbs
In my default page, I have the following code:
<txp:if_section name="gallery">
<txp:image_index wraptag="div" break="" />
<txp:image_display />
</txp:if_section>
Given the URL, I’d assume that visiting the page would output all the images in the category Video-thumbs (there are 3 images), but I’m not getting anything. Any thoughts? Am I doing something wrong? If I change the code to:
<txp:if_section name="gallery">
<txp:image_index c="Video-thumbs" wraptag="div" break="" />
<txp:image_display />
</txp:if_section>
… I still don’t get anything.
Last edited by ashground (2006-11-23 20:04:59)
Offline
#2 2006-11-23 19:54:03
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: txp:image index / txp:image display not working
ashground wrote:
In my default page, I have the following code:
You don’t happen to have another page template than ‘default’ assigned to section ‘gallery’, do you?
Also, I don’t see any difference between the two code examples you gave.
Offline
Re: txp:image index / txp:image display not working
No, there’s no difference; they both use the default page. And you’re right, I accidentally posted the same code twice. The second should read:
<txp:if_section name="gallery">
<txp:image_index c="Video-thumbs" wraptag="div" break="" />
<txp:image_display />
</txp:if_section>
Last edited by ashground (2006-11-23 20:05:39)
Offline
#4 2006-11-23 22:18:25
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: txp:image index / txp:image display not working
Does it work if you do this:
<txp:if_section name="gallery">
<txp:if_category>
<txp:image_index wraptag="div" break="" />
<txp:image_display />
</txp:if_category>
</txp:if_section>
Offline
#5 2006-11-24 03:19:03
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: txp:image index / txp:image display not working
A tag trace will likely reveal the problem.
Offline
Re: txp:image index / txp:image display not working
A tag trace only warns me that I have no txp:article tag, which is expected, no? Other than that, there are no problems.
Offline
#7 2006-11-27 06:36:09
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Offline
Re: txp:image index / txp:image display not working
Sorry, my mistake. Here’s the tag trace:
<!-- txp tag trace:
[SQL (0.000443): select name from txp_lang where lang='en-gb' limit 1]
[SQL (0.003358): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.004221): select name, code, version from txp_plugin where status = 1]
[SQL (0.000451): select name from txp_section where `name` like 'gallery' limit 1]
[SQL (0.000817): select * from txp_section where name = 'gallery' limit 1]
[SQL (0.013670): select host from txp_log where ip='205.200.60.204' limit 1]
[SQL (0.080457): insert into txp_log set `time`=now(),page='/current/gallery/?c=Video-thumbs',ip='205.200.60.204',host='stnbmb01bbk-ac07-60-204.dial.mts.net',refer='',status='200',method='GET']
[SQL (0.011834): select user_html from txp_page where name='default']
[Page: default]
<txp:output_form form="html_head" />
[SQL (0.001103): select Form from txp_form where name='html_head']
[Form: html_head]
<txp:page_title separator=" - " />
[SQL (0.000506): select title from txp_section where name='gallery']
[SQL (0.000380): select title from txp_category where name='Video-thumbs' and type='article']
<txp:css/>
<txp:css n="iefix" />
<txp:if_section name="gallery">
[<txp:if_section name="gallery">: true]
<txp:css n="gallery" />
</txp:if_section>
<txp:output_form form="page_head" />
[SQL (0.000537): select Form from txp_form where name='page_head']
[Form: page_head]
<txp:output_form form="page_right" />
[SQL (0.000998): select Form from txp_form where name='page_right']
[Form: page_right]
<txp:output_form form="ie_warning" />
[SQL (0.001093): select Form from txp_form where name='ie_warning']
[Form: ie_warning]
<txp:php>
</txp:php>
<txp:mdn_count section="article" />
[SQL (0.001382): SELECT COUNT(*) count FROM textpattern WHERE section='article' AND status='4']
<txp:mdn_count category="reviews" />
[SQL (0.008020): SELECT COUNT(*) count FROM textpattern WHERE (category1='reviews' OR category2='reviews') AND status='4']
<txp:mdn_count category="no rhyme" />
[SQL (0.016836): SELECT COUNT(*) count FROM textpattern WHERE (category1='no rhyme' OR category2='no rhyme') AND status='4']
<txp:mdn_count section="personal" />
[SQL (0.000631): SELECT COUNT(*) count FROM textpattern WHERE section='personal' AND status='4']
<txp:mdn_count section="video" />
[SQL (0.000697): SELECT COUNT(*) count FROM textpattern WHERE section='video' AND status='4']
<txp:search_input label="" button="Search" />
[SQL (0.000389): select form from txp_form where `name` = 'search_input' limit 1]
<txp:linklist category="Blogroll" sort="linksort" />
[SQL (0.000371): select Form from txp_form where name='plainlinks']
[Form: plainlinks]
[SQL (0.006411): select *, unix_timestamp(date) as uDate from txp_link where category = 'Blogroll' order by linksort ]
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:feed_link label="RSS" />
<txp:feed_link label="Atom" flavor="atom" />
<txp:output_form form="page_left_head" />
[SQL (0.000428): select Form from txp_form where name='page_left_head']
[Form: page_left_head]
<txp:if_search>
[<txp:if_search>: false]
</txp:if_search>
<txp:if_section name="gallery">
[<txp:if_section name="gallery">: true]
<txp:if_category>
[<txp:if_category>: true]
<txp:image_index wraptag="div" break="" />
[SQL (0.010216): select * from txp_image where category='Video-thumbs' and thumbnail=1 order by name]
<txp:image_display/>
</txp:if_category>
</txp:if_section>
<txp:output_form form="page_left_foot" />
[SQL (0.000912): select Form from txp_form where name='page_left_foot']
[Form: page_left_foot]
<txp:output_form form="page_foot" />
[SQL (0.000467): select Form from txp_form where name='page_foot']
[Form: page_foot]
[ ~~~ secondpass ~~~ ]
-->
Thanks for your patience.
Offline
Re: txp:image index / txp:image display not working
A-ha! I solved the problem — I didn’t realize that thumbnails were required in order for txp_image to work (and hadn’t thought of making thumbs until after getting the code to work).
Thanks again for your help, especially you, Mary. You’ve helped me out of quite a few binds now.
Offline