Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
<if article id> and article tags error
Hi there,
I’m getting the following error
Tag error: <txp:if_article_id id=“17”> -> Textpattern Notice: Article tags cannot be used outside an article context on line 1887
basically, the offending structure goes something like
<html>
<head>
<txp:if_article_id id=“17”>
link to a javascript file
</txp:if_article_id>
… rest of the page
it gives me the error on article list pages when in debug mode, and on my 404 page even when in live mode (which is the real concern).
Is if_article really considered an “article tag”?
do I have to remove the conditional in order for it to work, or is there a way around it?
thanks!
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: <if article id> and article tags error
Try changing
<txp:if_article_id id="17">
link to a javascript file
</txp:if_article_id>
into:
<txp:if_individual_article>
<txp:if_article_id id="17">
link to a javascript file
</txp:if_article_id>
</txp:if_individual_article>
In list context the article id is not defined, so if_article_id is meaningless.
Offline
Re: <if article id> and article tags error
ah. great! that explains and solves it!
thanks!
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Pages: 1