add js behaviors to koha

Par mc, 26 août 2009 15 h 36 min

when you create a new js file, you put it in the

koha-tmpl/WHERE-tmpl/prog/en/js/foo.js
# WHERE can be intranet or opac

now, in your template:

<script type="text/javascript" src="koha-tmpl/WHERE-tmpl/prog/en/js/foo.js"></script>

will fail if you use a translation. so write:

<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/behaviors.js"></script>

themelang is added in template C4::Output::gettemplate function (as you can easily see in the documentation) ;)

Related posts:

  1. navigate into koha code with vim
  2. edit koha code with vim
  3. the state of koha for macports
  4. Dance, Koha, dance !
  5. Template::Declare::Quickly ?

Laisser un commentaire

Panorama Theme by Themocracy