Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
The best way to make an archive section only with thumbnails ... !?
Hello,
I’m working on a site that’s very simple … well, more or less > http://www.mariaberkhout.nl/txp/
Every article (no title) is a very large image … nothing more. Now I want on the archive page thumbnails of those very large images from left to right and from top to bottom … no whitespace. Every thumbnail is a permlink to the article itself. Can I do this with only txtpattern tags? Which ones? Or do I need a plugin … and which one will that be?
Thanks for giving me a little push … :)
Offline
#2 2008-06-06 14:11:26
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: The best way to make an archive section only with thumbnails ... !?
You can do it in a myriad of ways. Even only with txp tags.
Sorry now I have no time to elaborate, but rest assured it’s doable
Offline
Re: The best way to make an archive section only with thumbnails ... !?
How about this (from the top of my head, so not tested)
Articleform:
<txp:permlink><txp:article_image thumbnail=“1” /></txp:permlink> <— I wonder if this is the correct way to display a thumbnail, so be careful!
Page form:
<txp:article limit=“40” />
CSS
container for images { width: xxx px; }
img { float: left; margin: 0; padding: 0; }
Last edited by TNT (2008-06-06 14:55:07)
…Prrrrrrrr…
Offline
#4 2008-06-06 14:40:55
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: The best way to make an archive section only with thumbnails ... !?
Taken from a live example. On the page I put:
<txp:if_article_list>
<txp:article listform="single_thumbnail" limit="99" sort="Posted asc" />
</txp:if_article_list>
form “single_thumbnail” containing:
<txp:if_custom_field name="shown_in_gallery" val="no"> // In case there are articles belonging to no gallery. (Categories were occupied yet.)
<txp:else />
<a href="<txp:permlink />" title="Opens the full size version of «<txp:title" />»" class="orange"><txp:article_image class="thumb" thumbnail="1" /></a>
</txp:if_custom_field>
Edit: typo.
Last edited by uli (2008-06-06 14:44:35)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: The best way to make an archive section only with thumbnails ... !?
OK, this is what I did. The site > http://www.mariaberkhout.nl/txp/
On section ‘large’:
<txp:article_custom form="notitle" limit="1" />
On section ‘small’:
<txp:article_custom section="large" listform="thumbs" limit="40" />
In listform ‘thumbs’:
<a href="<txp:permlink />" title="Opens the full size version!"><txp:article_image class="thumb" thumbnail="1" /></a>
Does it work? Allmost … :)( … because all images and thumbnails are on their landingpage … :) … but the permlink of each thumbnail goes to the same image … :( … even so the title and url are correct … !? What I’m doing wrong and don’t understand?
Last edited by RedFox (2008-06-07 07:19:10)
Offline
#6 2008-06-07 11:56:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: The best way to make an archive section only with thumbnails ... !?
I think you need to use <txp:article />
instead of <txp:article_custom />
for section ‘large’.
Edit: for clarification: for individual article display always use txp:article, because it is context sensitive. article_custom will just give you the first article that satisfies the condition(s) given by it’s attributes.
Last edited by els (2008-06-07 12:00:15)
Offline
Re: The best way to make an archive section only with thumbnails ... !?
Els, thanks!
Something else … on http://www.mariaberkhout.nl/txp/php?s=large I get a textpattern error:
TAG ERROR: <TXP:LINK_TO_NEXT SHOWALWAYS="1"> -> TEXTPATTERN NOTICE: ARTICLE TAGS CANNOT BE USED OUTSIDE AN ARTICLE CONTEXT ON LINE 1964
This tag (and the prev tag!) are used in the nav. Is there an alternative?
Offline
#8 2008-06-07 20:03:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: The best way to make an archive section only with thumbnails ... !?
You can use them on the page, you just have to wrap them in <txp:if_individual_article>
tags.
Offline