1 tilqicom Mar 10, 2012 04:19
3 tilqicom Mar 17, 2012 00:36
sam2kb wrote:
It's works exactly like you said right now.
In v5 you'll be able to add custom HTML before closing body, right from backoffice.
well when i add require_js inside any other function it did not work.. i will double check tomorrow.
4 sam2kb Mar 17, 2012 03:55
I think I misunderstood you. If you want to load some scripts before closing body, you can't do that with require_js.
Just output the scripts in SkinEndHtmlBody method. If they require jQuery, include it as usual with require_js('#jquery#'); in SkinBeginHtmlBody
5 tilqicom Mar 17, 2012 09:03
sam2kb wrote:
I think I misunderstood you. If you want to load some scripts before closing body, you can't do that with require_js.
Just output the scripts in SkinEndHtmlBody method. If they require jQuery, include it as usual with require_js('#jquery#'); in SkinBeginHtmlBody
yea but with require_js you avoid loading scripts multiple times.
if i just include scripts with <script></script> iniside SkinEndHtmlBody, you have the risk of loading duplicate scripts.Am i not right ?
6 sam2kb Mar 17, 2012 12:47
You are right. Then the only option you have is load them in the <head> with require_js
7 tilqicom Mar 17, 2012 12:55
sam2kb wrote:
You are right. Then the only option you have is load them in the <head> with require_js
well at least let that be my feature request for v5. Because i think you would agree that loading scripts in <head> is not always the best practice.
It's works exactly like you said right now.
In v5 you'll be able to add custom HTML before closing body, right from backoffice.