Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-09-03 10:50:05
- rockhorst
- New Member
- Registered: 2008-09-03
- Posts: 2
A collection of single articles divided by category on the same page
I could use a lot of words to describe what I’m trying to do, but as you can see from the subject title, that would probably be pretty disastrous. Instead I offer an image. What I’m trying to implement would sort of look like this:
http://i35.photobucket.com/albums/d154/rockhorst/articlelayout.jpg
What’s important is that in every div I want just 1 article from a particular category. Categories are part of the same section. The prev and next buttons should only browse through the particular category in that div (the standard link_to_next/prev don’t!). When clicking prev I want only the article in the respective div to change, the rest of the articles on the page should remain the same. This layout is sort of inspired by the Comicpress theme for Wordpress, which is pretty darn genious, but I’d say it should be possible with TXP. But so far, I’m totally lost and out of options. A big part of the prob would be solved if the options for article_custom would be available for article, but we all know that’s not the case.
Any suggestions and help is very much appreciated!
Last edited by rockhorst (2008-09-03 10:53:05)
Offline
#2 2008-09-03 12:21:34
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: A collection of single articles divided by category on the same page
I don’t think this can be solved with pure TXP. But it’s a perfect job for AJAX. (Take a look at the greenish example right hand side.) Maybe it’s even easier with jQuery, but I can’t find my bookmark.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: A collection of single articles divided by category on the same page
Could you not do that with a normal txp archive of articles according to category (analogue to this faq article on archive lists) and a carousel script such as jquery’s jcarousel to contain each category. Your form for the articles would include what you want to include per “pane” and your previous/next would simply slide the visible content in the div back and forth. Your page source might be a bit larger but you wouldn’t need to dynamically load data via ajax.
TXP Builders – finely-crafted code, design and txp
Offline
#4 2008-09-03 13:38:05
- rockhorst
- New Member
- Registered: 2008-09-03
- Posts: 2
Re: A collection of single articles divided by category on the same page
Looks like those solutions would work perfectly for written entries. Problem is: I’m using pictures, the total amount of which will increase with time. So let’s say that at some point I have 300 images in a category (like a webcomic), wouldn’t the page take forever to load? External scripts aren’t off limits, but a TXP-based solution is preferred (I’m not very fond of patching a site together from all different sources…a reason for using TXP or something similar in the first place. It’s supposed to be content management ;) ).
Any other suggestions (thanks for the help so far!)
Last edited by rockhorst (2008-09-03 13:40:55)
Offline
Re: A collection of single articles divided by category on the same page
Yeah, pre-loading 300 images would not be such a good idea 8-) The ajax way at least doesn’t require you to pre-load but will load dynamically on demand.
Ideally you want a sort of user-positionable fixed-size lightbox script to do the work for you. If your images were all linked via a rel attribute and the script did the next/prev for you, all you’d need to do is to output a list of links with txp and let the script take over from there.
Last edited by jakob (2008-09-04 19:53:25)
TXP Builders – finely-crafted code, design and txp
Offline