-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm creating my own theme to use in my projects, my problem is that I would like to add some scripts to the theme so they will be included globally in the projects where I use the theme, and even execute some initialization code if it's possible, as for the styles there are some extra .less files that I would like to include, how do I do this? I'm using Eclipse Luna with maven and ZK EE 7.0.3
Regarding adding less files, you can import them in the norm.less of your theme project.
This is located at src/main/resources/web/<themename>/less/norm.less
Then just put the less file in the same folder and import by adding:
@import "~./<themename>/zul/less/_<lessfile>.less";
Regarding scripts do you mean javascript ? I have never put them in a theme, but try adding them to your src/main/resources/metainfo/zk/lang-addon.xml file like this:
<javascript src="~./<themename>/js/<filename>.js"/>
place the scripts in the location that suits where ~./ is the src/main/resources/web folder of your project.
Asked: 2015-04-20 15:52:58 +0800
Seen: 22 times
Last updated: Apr 23 '15