Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-08-06 16:24:37
- mhulse
- Plugin Author
- From: Eugene Oregon
- Registered: 2005-01-21
- Posts: 200
Rows and Cols... Like Expression Engine?
Hi,
Is there a way to use TXP tags to do this:
X | Y | X
X | Y | X
X | Y | X
Where X and Y are divs/div classes.
The wiki (and calendar, maybe other things) “row_x” (and possibly “switch”) tags, in Expression Engine, are examples of what I am looking for.
I was planning on using PHP within my TXP template to achieve the desired effect… But I thought I would ask here first. :)
Thanks!
Cheers,
Micky
Last edited by mhulse (2007-08-06 16:29:33)
Offline
#2 2007-08-07 06:00:20
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Rows and Cols... Like Expression Engine?
Can you give a small example of what you mean? I don’t follow what you’re asking.
Offline
#3 2007-08-07 06:23:22
- mhulse
- Plugin Author
- From: Eugene Oregon
- Registered: 2005-01-21
- Posts: 200
Re: Rows and Cols... Like Expression Engine?
Hi Mary! Thanks for your help. I really appreciate it. :)
Well, lets see… maybe this will help explain better:
[ div.side | div.middle | div.side ]
[ div.side | div.middle | div.side ]
[ div.side | div.middle | div.side ]
The above would be a three column layout. Each div would have an article.
I need a way to loop through my articles, and set a different class name for the containing div depending where it is located (side or middle col.)
Lets say I have seven articles, then my layout would look like this:
[ div.side | div.middle | div.side ]
[ div.side | div.middle | div.side ]
[ div.side ]
Or, lets look at it sans-layout:
1. [div.side]article[/div.side]
2. [div.middle]article[/div.middle]
3. [div.side]article[/div.side]
4. [div.side]article[/div.side]
5. [div.middle]article[/div.middle]
6. [div.side]article[/div.side]
7. [div.side]article[/div.side]
Hmmm, I hate to say it, but I may have found some help here … Sorry if I am starting to cross-post… I originally did not think the two threads would become so related.
Well, I guess the question still remains, is there a way to alternate classes, like above, to rows/cols via built-in TXP tags?
TIA!
Cheers,
Micky
Last edited by mhulse (2007-08-07 06:24:08)
Offline
#4 2007-08-07 07:27:00
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Rows and Cols... Like Expression Engine?
zem_nth is probably your guy.
Offline
#5 2007-08-08 05:48:24
- mhulse
- Plugin Author
- From: Eugene Oregon
- Registered: 2005-01-21
- Posts: 200
Re: Rows and Cols... Like Expression Engine?
Ooooh, wow, thanks! Looking at that now. Just got back from a trip to Ikea!
Thanks Mary, that plugin looks very promising — also probably will be good for learning purposes… It will be interesting to see how zem tackled this situation. :)
Thanks again!
Also, thanks again for contributing to Textpattern Solutions… Great book. Every TXP user should buy it. :)
Cheers,
Micky
Offline