0

I am new to velocity.

I want to create new Liferay theme using bootstrap. But don't know how to include js files in the template.

Prakash K
  • 11,669
  • 6
  • 51
  • 109
Kliver Max
  • 5,107
  • 22
  • 95
  • 148
  • 1
    You might find this [detailed answer](http://stackoverflow.com/a/12951958/468763) to a similar [question](http://stackoverflow.com/q/12936061/468763), very useful. – Prakash K Jan 14 '13 at 15:28
  • It might be a duplicate of the [question](http://stackoverflow.com/q/12936061/1734150) mentioned in the above comment – Rasabihari Kumar Jan 14 '13 at 15:37

1 Answers1

2

Actually it's the same way as you would with an HTML page:

<script type="text/javascript" src="/my-theme/js/jquery.min.js"></script>

Just make sure that the JavaScript is in the relevant js folder in the theme's folder structure.

Jonny
  • 2,663
  • 1
  • 24
  • 24
  • 1
    You mean that path to js file no need in any velocity variables? Just write it begin theme root? – Kliver Max Jan 14 '13 at 10:16
  • Nope, it doesn't need to be. However if you're using across multiple templates for some reason then you might want to set in a Velocity variable. – Jonny Jan 14 '13 at 11:22