Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-02 18:18:37

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

<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

#2 2008-01-02 18:49:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#3 2008-01-02 19:13:38

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: <if article id> and article tags error

ah. great! that explains and solves it!

thanks!


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

Board footer

Powered by FluxBB