Personalizza la produzione di snippet di Design Manager in SharePoint 2013
-
10-12-2019 - |
Domanda
C'è un modo per modificare o personalizzare l'output di Design Manager Snippets nel 2013?
Se creo uno snippet per una proprietà contenente un tassonomyfieldmulti ottengo questo
<div data-name="Page Field: Categories">
<!--CS: Start Page Field: Categories Snippet-->
<!--SPM:<%@Register Tagprefix="PageFieldTaxonomyFieldControl" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint.Taxonomy, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
<!--MS:<PageFieldTaxonomyFieldControl:TaxonomyFieldControl FieldName="b009868e-1574-4327-b1da-488660ade3f4" runat="server">-->
<!--PS: Start of READ-ONLY PREVIEW (do not modify)-->
<div align="left" class="ms-formfieldcontainer">
<div class="ms-formfieldlabelcontainer" nowrap="nowrap"><span class="ms-formfieldlabel" nowrap="nowrap">Categories</span>
</div>
<div class="ms-formfieldvaluecontainer"></div>
</div>
<!--PE: End of READ-ONLY PREVIEW-->
<!--ME:</PageFieldTaxonomyFieldControl:TaxonomyFieldControl>-->
<!--CE: End Page Field: Categories Snippet-->
</div>
.
che rende il seguente
<div data-name="Page Field: Categories">
<span title="Design Manager">Design Manager</span>
;
<span title="SharePoint 2013">SharePoint 2013</span>
</div>
.
Non esattamente quello che volevo, diciamo che ho voluto una lista non ordinata (UL) invece, c'è un modo per personalizzare l'output di questi frammenti?
Grazie
Soluzione
Ultimately these snippets are basically just for preview purposes - they would not change the actual server side rendering of the final components! You could change various settings, but mainly styling via CSS (http://msdn.microsoft.com/en-us/library/office/dn205275.aspx) but this won't affect the final results.
Exactly for the Metadata publishing field (PageFieldTaxonomyFieldControl:TaxonomyFieldControl is unfortunately Sealed - so no chance in overriding behavior of the rendering).
You should rather use the TaxonomyWebTaggingControl as described here http://pholpar.wordpress.com/2010/02/15/build-your-own-user-interface-components-using-the-taxonomy-controls/ - which should give you more control into the final rendering.
Still, with regards to the actual snippets themselves, there is not much you could do.