I'm in a situation where I want to grab the web part controls and/or HTML content of the controls for a publishing page, and format the content before it is rendered.
How can I go about this? I've thought about using a UserControl to run server-side code, or perhaps in the layout that the content resides in? However, the layout is in the design manager.
How can I access this published page content before it is rendered?
Edit: The end goal is to allow users to specify HTML tags (i.e. data- attributes) and handle them on the server-side to hide and display content based on varying business scenarios; thus, allowing them to easily add/edit content that will be displayed dynamically).
SharePoint 2013 - On premise