I have this page layout where I'm exposing and making editable the 'CustomSiteCategory' property on edit mode
<PublishingWebControls:editmodepanel runat="server" id="editmodepanel1">
<SharePointWebControls:DropDownChoiceField
ID="DropDownChoiceField1"
FieldName="CustomSiteCategory"
runat="server">
</SharePointWebControls:DropDownChoiceField>
</PublishingWebControls:editmodepanel>
This works fine and I'm able to modify the property when I edit the page.
Now a new requirement came up to show an icon on the page based on what the 'CustomSiteCategory' is.
I thought this would be trivial, but since 'CustomSiteProperty' is in the EditModePanel, the HTML for it doesn't get rendered when in non-edit mode so I can't use JavaScript sorcery to pull this property.
Ideally, what I would like is for this property to be shown/editable only in edit mode, and outside of it, it should still render in the HTML as something like
<div style="display:none" id="CustomSiteProperty">[CustomSiteProperty value]</div>
Is there any way to do this? I'm also open to alternatives.