Forums / Developer / page specific javascript in header

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

page specific javascript in header

Author Message

Ed Bloom

Thursday 05 February 2009 6:51:19 am

hi,

i'm implementing some tracking codes for specific calls to action on my site (i.e. click "buy now" button)

I need to do the following:

1.) add page specific javascript to the header of my Exponential website
e.g. Page A has js snippet A, Page B has js snippet B

2.) add onclick event to a link or button on page A (trivial to implement via Exponential)

my question relates to point 1.

How do I embed some logic into my template to render different javascript snippets for different pages served from Exponential?

Many thanks,

Ed

André R.

Thursday 05 February 2009 8:13:58 am

http://ez.no/developer/forum/developer/smart_loading_of_javascript

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom