Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

How to find all blocks for current page in ContentArea or XHtmlString based on or inherited from FormContainerBlock

$
0
0

How can I find all blocks that are or inherit from FormContainerBlock for current page in ContentArea or XHtmlString when page is saved? This would include existing pages/blocks OR when a page/block is created. I would like to set a page level property of ScaffoldColumn false.

This will be trigger when the _Layout @Html.RequiredClientResources(RenderingTags.Header) and @Html.RequiredClientResources(RenderingTags.Footer) are added. We don't want to add these unless they are being used. All of our pages are based on _Layout and as such not all will utilize epi Forms.

The tricky part is that a block my have a child block so recurrion might be needed.


Viewing all articles
Browse latest Browse all 9076

Trending Articles