Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Mix different forms in one article list
I would like, on my home page, to have articles from section X use form A, and articles from section Y use form B. I know I can achieve that with form override, but I need it to be semi-automatic based on the section.
(I’m going after a mix of regular posts and remaindered links ala kottke.org. If I create a section for the remaindered links, it’ll make it very easy to manage them, and display them one way on their own page, and in a “brief” fashion on the home page. Check my site for and embryonic sketch of what I’m after, though for now it’s with form override.)
Yes, I have tried turning it off and on.
Offline
Re: Mix different forms in one article list
Hi alesh,
try with <txp:if_article_section name="section-name">...</txp:if_article_section>
in your article form to create different forms per article section (using the same form).
More info in this FAQ
Last edited by maniqui (2006-04-14 05:19:34)
Offline
Re: Mix different forms in one article list
of course! Thanks!!
Yes, I have tried turning it off and on.
Offline
#4 2006-04-18 07:28:04
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: Mix different forms in one article list
Is there a way to define a different limit for the form A and for the form B? I can’t figure it out…
Offline
#5 2006-04-18 07:39:14
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Mix different forms in one article list
Well no, that doesn’t even make sense. ?
Offline
#6 2006-04-18 07:44:55
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: Mix different forms in one article list
It does make sense. I want to display 1 main article from section X using form A and 10 secondary articles from section Y using form B.
Offline
#7 2006-04-18 08:50:18
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Mix different forms in one article list
Okay, that’s got nothing to do with this topic, you threw me off. :)
You’d do:
<txp:article_custom section="x" limit="1" form="a" />
<txp:article_custom section="y" limit="10" form="b" />
Last edited by Mary (2006-04-18 08:50:27)
Offline
#8 2006-04-18 09:10:39
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: Mix different forms in one article list
Mary, I think you misunderstood the idea of this thread. There must be only one article list so articles from both sections can be displayed based on date. Using two forms you only display articles from one section and below articles from another sections. The idea is to mix them.
Offline
#9 2006-04-18 13:38:20
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Mix different forms in one article list
I understand completely what this thread is about.
You probably want a plugin.
Offline
#10 2006-04-18 13:54:57
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: Mix different forms in one article list
Mary wrote:
I understand completely what this thread is about.
Well, you suggested using article_custom tags which is out of question…
Anyway, does anyone know how to do it? Maybe with some of the existing plugins?
Offline
Re: Mix different forms in one article list
>Jaro
you could accomplish what you want with zem_ntn in the following way;
On your page use
<code><txp:article_custom section=“x,y” form=“snazzyForm” /></code>
Then make “snazzyForm” look like;
<code><txp:zem_nth step=“1”>
Your first form elements and attributes
</txp:zem_nth>
<txp:zem_nth step=“2-5000”>
Your second form elements and attributes
</txp:zem_nth>
</code>
You can style as many articles as differently as you like and you can use repeating intervals. Hope that helps.
Last edited by mrdale (2006-04-18 16:55:06)
Offline
#12 2006-04-18 17:54:39
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: Mix different forms in one article list
Thanks Dale! I will look into it as soon as possible.
Offline
Pages: 1