Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2013-08-06 16:18:49
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: One Page, different content using forms
SPKuja wrote:
It shoudl load the “android” form, but it doesn’t load any thing
You have an article tag on your page that, in order to display something, needed contents that you don’t give it. Instead you’ve put another article tag inside the form. You either build a form android with the tags you need. Or you try changing the code on your page template so that <txp:article form="android" /> becomes <txp:output_form form="android" /> and see what happens. The latter is another valid possibility to connect the page with the form “android”.
But as you have an article_custom tag with an unspecified form attribute the output then depends on what you have inside your default form, the one that’s always queried when no specific form is declared. That might be what you’re after but it also could be too restricting or cause more false/undesired output, we can’t know.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: One Page, different content using forms
All working perfectly now! I changed the code to:
<txp:if_section name="">
<txp:output_form form="all_news" />
</txp:if_section>
<txp:if_section name="android">
<txp:output_form form="android" />
</txp:if_section>
Thank you every one for all your help, it works just like I needed, and will reduce the ammount of pages I need to make!
Offline
#18 2013-08-07 14:23:50
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: One Page, different content using forms
Glad that it solved it already.
Just an annotation: Though I said it’s a valid way to connect page and form, I think it might be wise to check whether this way you obstruct the possibility to switch between forms from the Write panel, I mean the “overwrite form” feature.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: One Page, different content using forms
From what I see it does, but I have resolved that by having a seperate page for content. So I only have 2 pages set up which is easy to manage, unlike before where I had 50+!
Offline