Closed iJungleboy closed 1 year ago
@tvatavuk I haven't documented this yet, and I forgot what must be done :) could you quickly post your findings here, so that I'll add them to the official docs later?
Our custom c# code has to be executed in the page .OnPreRender
event. Here is example of code, that can be used in skin ascx.
<script runat="server">
public IRenderResult Data;
protected override void OnPreRender(EventArgs e) {
base.OnPreRender(e);
Data = this.GetScopedService<ToSic.Sxc.Services.IRenderService>().Module(1494, 2563);
}
</script>
<%= Data %>
thx!
I'm submitting a ... [x] bug report => search github for a similar issue before submitting [x] feature request
...about [x] Razor templating [x] DNN parts
Current behavior
When including a 2sxc module in the theme using the IRenderService, it does not auto-include the JS/CSS assets in the page.
But it should...
fixed in 9e508ad056972c65f9f8035265b5b5f91610d19b and d0d70c568eedbbe10661a57c261e259c8d65e8a3
Your environment