Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-11-24 12:01:45

leafy_loader
Member
Registered: 2008-09-25
Posts: 96

output a form using if_category conditional

I get an error message along the lines of missing article tag when I try to output a tp form that’s within a if_category conditional.

I simply want to output the form if a particular category has been clicked on and nothing else. Why do I need an article tag? Is there a way around this?

Also, when creating a form I have to choose a type from the select menu, what’s the point of doing this? Is it purely for organising the forms into their own ‘types’?

Offline

#2 2009-11-24 12:44:46

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: output a form using if_category conditional

leafy_loader wrote:

Why do I need an article tag? Is there a way around this?

You don’t need an article tag, you might as well replace it with an smd_query, it’s just a reminder. Simply set your site’s production status to Live and the error is gone.

Also, when creating a form I have to choose a type from the select menu, what’s the point of doing this? Is it purely for organising the forms into their own ‘types’?

Type article e.g. takes care of listing only these forms in the select menu “Override form” on the Write tab.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2009-11-24 13:03:28

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: output a form using if_category conditional

You could simply ignore the message, it won’t appear when you change the status of the site from ‘Testing’ to “Live’ but, like most folk, you likely won’t be comfortable with that.

TXP form types behave in different ways, the article form in particular. Generally, a better way to achieve what you want might be to have the if_category conditional within an article form, probably one that already exists. The output of the conditional is then in an article context and you won’t get the warning message.

None of this contradicts Uli’s post which beat mine to the finishing line.

Offline

Board footer

Powered by FluxBB