<!--mailchimp popup form-->
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script>
<script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us2.list-manage.com","uuid":"me","lid":"you"}) })</script>
I know I could do the external script reference like so:
Html.AddScriptParts(ResourceLocation.Foot, "//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js", true);
But this doesn't account for the other parameters:
data-dojo-config="usePlainJson: true, isDebug: false". Not sure if you can do that with AddScriptParts?
Next I could add the actual js into another local js file and include it the same way.
But how can you do both in one file. Essentially like the old @include for classic ASP where I can put these two lines (the external reference and actual js) into one file and have it injected into the header? Why? Namely for ease of re-integrating when upgrading or changing themes.
I see you could use a controller action to return content and call that in the header like the blog:
@Html.Action("RssHeaderLink", "Blog").
But is there a way to do this with client side code and not having to create a whole new controller and compile, etc?