I'm new to umbraco and want to achieve the following:
- I want to be able to create html+js-only widgets. I order for the JS to work it has to be loaded at the bottom of the page after some pre-requisite scripts (jQuery, React, Adal.js etc).
However, the HTML helper in the partial is not being triggered (the one in the masterpage IS being hit). I am wondering if I'm doing something fundamentally wrong or just doing something slightly wrong.
NB: I've noticed that when in the backoffice the method RequireScript IS called, but not EmitRequiredScripts. This is logical because EmitRequiredScripts is in the front-end masterpage. However, RequireScript is not being called in the front-end. It seems to be stripped out somehow. Similarly when I add
Partial View Macro - output script tags
Hi,
I'm new to umbraco and want to achieve the following: - I want to be able to create html+js-only widgets. I order for the JS to work it has to be loaded at the bottom of the page after some pre-requisite scripts (jQuery, React, Adal.js etc).
I have followed this post: http://stackoverflow.com/questions/5355427/populate-a-razor-section-from-a-partial?rq=1 in order to inject script tags from a partial view into the bottom of a masterpage.
However, the HTML helper in the partial is not being triggered (the one in the masterpage IS being hit). I am wondering if I'm doing something fundamentally wrong or just doing something slightly wrong.
Here is the Partial view macro
Master.cshtml
This is the HTML helper from the stckexchange post people have used successfully:
Please let me know if this is a good way to go, what I'm doing wrong or if there are superior ways to solve this problem.
Kind Regards, Jurgen
NB: I've noticed that when in the backoffice the method RequireScript IS called, but not EmitRequiredScripts. This is logical because EmitRequiredScripts is in the front-end masterpage. However, RequireScript is not being called in the front-end. It seems to be stripped out somehow. Similarly when I add
is working on a reply...