November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Jämes,
If you really have to use an Episerver block this will still have to exist somewhere, most likely in a dedicated shared Block folder.
It sounds to me though like there is something in the presentation of the block you are wanting to reuse. If the block does not need an editor to enter content, it is probably better that you just create a partial view or user control that is then rendered on the page.
Dear community,
For a special purpose, I need to create a block each time I render a page (I need to reuse an EPiServer block in a non EPiServer page). This is fairly easy to do with a view model. Let's assume my view model is defined as:
In the code above, the view model exposes a new instance of MyBlock, that inherits from BlockData. Finally, I render the block in my view:
Do you see any issue of doing that ? Does it create unnecessary reference in the database each time I create a new instance of a class that inherits from BlockData ?
Many thanks !
Kind Regards,
Jämes