Frontend TaxonField Control Markup
When editing Widget templates the generated code for Tags\Cats are the 2 TaxonField controls is something like this
<sitefinity:HierarchicalTaxonField ID="HierarchicalFieldControl" runat="server" TaxonomyId="E5CD6D69-1543-427b-AD62-688A99F5E7D4" DisplayMode="Read" WebServiceUrl="~/Sitefinity/Services/Taxonomies/HierarchicalTaxon.svc" Expanded="false" TaxonomyMetafieldName="Category" HideWhenNoTaxaFound="False" NoTaxaExistsMessage="None" CssClass="cme-event-single-categories" ExpandText="ClickToAddCategories" BindOnServer="true" /><a style="" href="javascript:__doPostBack('ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$expandButton_read','')" class="sfOptionalExpander" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_expandButton_read" onclick="return false;"></a><div style="" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_expandTarget_read"> <ul class="sfCategoriesList" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_selectedTaxaList_read"> </ul> <ul class="sys-template" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_selectedTaxaBinder_read_ctl00_clientTemplate"> <li class="sys-container"> <span>Title</span> <a class="sf_binderCommand_remove sfRemoveBtn sfDisplayNoneImportant" href="javascript:void(0);">[x]</a> </li> </ul> <div class="sfHintWrapper sfDisplayNoneImportant"> <label class="sfInputHintVisible" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_taxaInputHint_read" for="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_taxaInput_read"></label> <input type="text" class="sfTxt valid" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_taxaInput_read" name="ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$taxaInput_read"> <a href="javascript:__doPostBack('ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$addTaxaButton_read','')" class="sfLinkBtn sfChange" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_addTaxaButton_read" onclick="return false;"> <strong class="sfLinkBtnIn">Add</strong> </a> </div> <div class="sfSelectExistingExpander sfDisplayNoneImportant" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_selectFromExistingPanel_read"> or, <a href="javascript:__doPostBack('ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$selectFromExistingButton_read','')" class="sfColExpLink" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_selectFromExistingButton_read" onclick="return false;">Select from existing</a> </div> <div class="sfBlockLoading sfDisplayNoneImportant" style="display:none;" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_openingExistingLoader_read"> Opening existing... <img alt="" src="/WebResource.axd?d=v44UedyWLB0_NpDbFSrq3k7KDcCzI1UUkBBYaxeDuGHc2M-p2JKVif84Xo0UfQXiemhB8kzfO_9wuuCG1JnruqOTDuVd3Wkuc80YDy0fOM6nah-Oup_mlR5TI7qxMUL0YlsvvmyjE32Qv4zYpmjz92A8LdMYcBn2d-KM2WX53fslUf8_22KoENd74TV_4A6O1zS3HT9l3Zj1sBzIhFgm25771jUIIHwd722dWCX_6GU1&t=634447972620000000" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_lodingExisting_read"> </div> <div style="display:none;" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_existingTaxaPanel_read"> <a href="javascript:__doPostBack('ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$closeExistingButton_read','')" class="sfColExpLink" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_closeExistingButton_read" onclick="return false;">Close existing</a> <div class="sfExistingTagsWrapper"> <p style="display:;" class="sfShownTagsTitle" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_existingTaxaTitle_read">Most popular tags</p> <div class="sfExistingTagsListWrapper sfClearfix"> <em>Click to select:</em> <ul class="sfExistingTagsList" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_existingTaxaList_read"> </ul> </div> <a href="javascript:__doPostBack('ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$showAllTaxaButton_read','')" class="sfShownSwitcher" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_showAllTaxaButton_read" onclick="return false;"><span id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_showAllLabel_read">Show all</span><span id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_taxaTotalCount_read">53</span><span id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_taxonomyTitle_read">Tags</span></a> <a style="display:none;" href="javascript:__doPostBack('ctl00$ContentBody$C005$eventsFrontendEdit$ctl00$ctl00$SingleItemContainer$ctrl0$FlatFieldControl$ctl00$ctl00$showOnlyMostPopularTaxa_read','')" class="sfShownSwitcher" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_showOnlyMostPopularTaxa_read" onclick="return false;">Show only most popular</a> <div class="sfBlockLoading" style="display:none;" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_openingAllLoader_read"> Opening all... <img alt="" src="/WebResource.axd?d=v44UedyWLB0_NpDbFSrq3k7KDcCzI1UUkBBYaxeDuGHc2M-p2JKVif84Xo0UfQXiemhB8kzfO_9wuuCG1JnruqOTDuVd3Wkuc80YDy0fOM6nah-Oup_mlR5TI7qxMUL0YlsvvmyjE32Qv4zYpmjz92A8LdMYcBn2d-KM2WX53fslUf8_22KoENd74TV_4A6O1zS3HT9l3Zj1sBzIhFgm25771jUIIHwd722dWCX_6GU1&t=634447972620000000" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_lodingAll_read"> </div> </div> <ul class="sys-template" id="ctl00_ContentBody_C005_eventsFrontendEdit_ctl00_ctl00_SingleItemContainer_ctrl0_FlatFieldControl_ctl00_ctl00_existingTaxaBinder_read_ctl00_clientTemplate"> <li class="sys-container"> <a class="sf_binderCommand_select" href="#">Title</a> <span>(ItemsCount)</span> </li> </ul> </div> </div>Hi Steve,
Now what you report is really strange, as you correctly pointed out, setting the DisplayMode="Read" should do exactly this - hide the editing functionality and display the categories/tags associated with the item as list items. Please find attached a screenshot demonstrating how the default functionality works. I know it might sound strange, but can you, please, make sure that the DisplayMode property is not set to Write by any chance?
Best wishes,
Boyan Barnev
the Telerik team
Ok so take that screenshot...and look just below where you circled...there's a whole mess of display:none controls which shouldn't be there becasue we are in Read Mode...however they are still getting rendered and sent to the client.
Hi Steve,
Actually that's the current implementation that we have - we chose to have the HTML loaded in both Read and Write conditional templates and when in Read to hide it with display:none. However, I respect your feedback on this issue so I'm going to log it in our system for internal discussion. Thanks a lot for your kind assistance in providing us with detailed information about this issue. Your Telerik points have been updated accordingly.
Regards,
Boyan Barnev
the Telerik team