I'm working on implementing sidebar widgets into a site. For every page, editors can choose which widgets to use using the multi-media picker. Each widget type has a docType and Partial for the markup. The widget Partials are loaded based on their docType. In order to do this, I have a sidebar Partial which basically acts as a calls the individual widget Partials.
However, doesn't seem like something that should be a partial, but rather a helper/function or something. I'm pretty much a newb, so I'm wondering if it's best left as a partial or how to create it as a helper?
MVC Partial or Helper (4.11)
I'm working on implementing sidebar widgets into a site. For every page, editors can choose which widgets to use using the multi-media picker. Each widget type has a docType and Partial for the markup. The widget Partials are loaded based on their docType. In order to do this, I have a sidebar Partial which basically acts as a calls the individual widget Partials.
Called like:
However, doesn't seem like something that should be a partial, but rather a helper/function or something. I'm pretty much a newb, so I'm wondering if it's best left as a partial or how to create it as a helper?
It might be called like:
Any help would be great.
I would also like to know what's best here. Currently we're using partial views for it, but I'm not sure if it's better than a helper.
Jeroen
is working on a reply...