Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
use js script in the head of a particular post
Is there a way to include external js documents in particular articles?
The js if very long and it is not going to be needed in most pages and the structure of the site does not allow me to create a new section for it.
I know of <code><txp:article_id /></code> but that does not help.
<i>Maybe this should go in either the feature requests or the plugin requests.</i>
Trying to make my self clear: Is there a method that I can do something like:
<br/>
<code><txp:if_article_id=“60”><script src=“javascriptdocument.js” type=“text/javascript”></script></txp:if_article_id><code>
<code><txp:if_article_id=“38”><script src=“javascriptdocument.js” type=“text/javascript”></script></txp:if_article_id><code>
<code><txp:if_article_id=“212”><script src=“javascriptdocument.js” type=“text/javascript”></script></txp:if_article_id><code>
or even better, is there a way for:
<code><txp:if_article_id=“60,38,212” ><script src=“javascriptdocument.js” type=“text/javascript”></script></txp:if_article_id></code>
Last edited by colak (2006-02-12 06:55:19)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: use js script in the head of a particular post
Colak,
Could you use this plugin for the if_article id list?
Matthew
Also, note that one of your code tags must not be closed?
Last edited by ma_smith (2006-02-11 22:11:57)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: use js script in the head of a particular post
matthew
thanks for that! I guessed I’ve missed it as it did not have a thread of its own
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline