Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Using txp:if_first_article triggers article context warning
I’m using txp:if_first_article in a variable definition (to assign one value for the image width on the first article on my page, and another width to all that follow). It seems to work fine except it throws an error: “Article tags cannot be used outside an article context.”
How dangerous would it be to just ignore this? (the warning disappears when I switch Production Status to “live.”)
Or, how would I fix this?
The form which creates and uses this variable is an article form. All the forms that reference it directly are also article forms. Changing higher up misc forms to article forms for testing purposes didn’t make the warning go away.
Any ideas?
Offline
Re: Using txp:if_first_article triggers article context warning
floodfish wrote:
How dangerous would it be to just ignore this? (the warning disappears when I switch Production Status to “live.”)
Not dangerous, if you don’t mind it this way.
Or, how would I fix this?
Wrap it in if_individual_article
.
Code is topiary
Offline
Re: Using txp:if_first_article triggers article context warning
Thanks. As it turns out, I ended up rewriting all this with different logic, but I’ll keep this in mind!
Offline