0
votes

DNN 9.3.2 / 2sxc 10.25.2

Occasionally I get requests to make a fancy design in DNN and 2sxc where a navigation or a breadcrumb is placed within the component I'm creating. For example, a page Hero that has a background image, a heading, some text, and a DNN breadcrumb built within it.

Another scenario is: a sidebar card that has a heading, text, a ddr menu of the current root's children, and then some more text.

I want to always use 2sxc to make it easy for Content Editors to edit the content, but leverage DNN theme objects to output content dynamically inside of the template.

Is there a way to load a DNN skin object (like the breadcrumb, or ddrmenu, or logo) through a 2sxc c# razor template?

1

1 Answers

1
votes

At least directly this is going to be very hard, because Razor is part of MVC which doesn't fit well with the .ascx web components. So almost impossible.

The workaround is to use some jQuery magic - put the real components on the page the normal way - maybe in a hidden div - and then jquery-move it to the place where it should be injected.