3217 Posts in 853 Topics by 812 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 149 Views |
-
Set in template javascript without it in the template to specify

25 October 2012 at 4:34am
hi,
how can i set javascript in Frontend Template without '<% function %>'?
i want set it in class modelAdmin, the javascript should be on all sides.regards, dh
-
Re: Set in template javascript without it in the template to specify

25 October 2012 at 12:47pm
Hi Dh,
I'm not sure what you want here. Does this help?You can use:
Requirements::javascript(THEMES_DIR.'/myproject/js/script.js');
In your DataObject's getCMSFields() function. That will automatically load the javascript when the ModelAdmin loads that DataObject's class.
- Julian
-
Re: Set in template javascript without it in the template to specify

25 October 2012 at 7:27pm Last edited: 25 October 2012 7:28pm
Requirements::javascript(THEMES_DIR.'/myproject/js/script.js');
make it in Backend, i need it in Frontend, in the view area (in the *.ss - <head></head> or best on body tag end)this is for my module.
| 149 Views | ||
|
Page:
1
|
Go to Top |


