Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-15 15:53:50

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

TXP Solutions - meta forms + javascripts query

Hi,

I’ve implemented the meta data process from the Textpattern Solutions book (using forms combined with custom fields to load static and dynamic meta data) and it’s working really well – thanks guys.

My question regards the loading of javascripts, I don’t need them to load on every page and other times (ie jCycle) there’s a different set of requirements depending on what effect is being used. I’m trying to find a solution that’s as elegant as the Potts/Sable/Smith approach – at the moment I’m calling specfic js from articles rather than having it in the head, but I understand that may be frowned upon in certain circles!

Does anyone have any thoughts on a workaround?

Offline

#2 2009-04-15 16:09:51

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: TXP Solutions - meta forms + javascripts query

decoderltd wrote:

Does anyone have any thoughts on a workaround?

In your head:

<txp:if_article_id id="any_article_id">
	your javascript here
</txp:if_article_id>

or

<txp:if_section name="some_section">
	your javascript here
</txp:if_section>

Offline

#3 2009-04-15 16:23:10

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: TXP Solutions - meta forms + javascripts query

Perfect, thanks Redbot. That’s working well just one question – for the default page what should be entered in the section name?

Offline

#4 2009-04-15 16:37:03

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: TXP Solutions - meta forms + javascripts query

decoderltd wrote:

Perfect, thanks Redbot. That’s working well just one question – for the default page what should be entered in the section name?

<txp:if_section name="">
	your javascript here
</txp:if_section>

Offline

#5 2009-04-15 16:41:42

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: TXP Solutions - meta forms + javascripts query

Great, thank you once again Redbot.

Offline

Board footer

Powered by FluxBB