Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-02-05 16:57:47
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Why does output_form within an article give me an error?
Within an article list, ive output a form that uses a txp tag within php tag, but the page returns an error:
Tag error: <txp:custom_field name="colors" /> -> Textpattern Notice: Article tags cannot be used outside an article context on line 2175
my form is this:
<txp:php>
$colors = ‘<txp:custom_field name=“colors” />’;
echo $colors;
</txp:php>
Im not sure why im getting this error, if I use the tag within the form it outputs properly.
Thanks
Rich
Offline
#2 2010-02-05 17:02:49
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: Why does output_form within an article give me an error?
Forget it – i figured it out using the PHP function instead.
Offline
#3 2010-02-05 18:00:06
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Why does output_form within an article give me an error?
richtestani wrote:
i figured it out
Nevertheless: Article tags cannot be used outside an article context means just what it says… Use the tag in question either
- in an article form
- inside txp:article or txp:article_custom container tags
- wrapped in txp:if_individual_article tags
And if I’m not mistaken your php form does exactly the same as <txp:custom_field name="colors" />
…
Offline