I am building a dynamic page type, I want to load to it different scripts based on the block that was loaded in a certian ContentArea.
This is the Area:
[AllowedTypes(new[] { typeof(Types.SomeBlockType)})]
public virtual ContentArea SomeArea { get; set; }
On my page view I am rendering the content and the script: (the script render is via the layout)
@Html.PropertyFor(...)
.
.
@section Scripts {
...//some scripts loaded
}
The problem I have is that the scripts inside the block in the SomeArea content, are running before the section Script. I want the block scripts to be executed after my layout scripts & page scripts were loaded...
Appreciate any help.