Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How do I Add a Catalog Item Reuse Snippet to a Custom Layout

$
0
0

We have a site content type named "Clinic".  I added a new site column named "UrgentCarePhone" to the content type.  I populated the field in the "Clinics" list that inherets the "Clinic" content type.  I checked the "Managed Properties" and an entry exists for "UrgentCarePhoneOWSText" that maps to "ows_q_TEXT_UrgentCarePhone".   There is an existing "PrimaryPhone" field in the Managed Properties area.  These two seem to match exactly/are set up the same.

I am using a custom page layout "hc_CatalogItem_Clinic.html" for the search detail.  The Primary Phone field appears fine.  I'm trying to add an additional Urgent Care Phone.  I can't find alot of documentation on this, but it sounds like I should be able to copy the the Primary Phone catalog item resuse webpart and adjust it accordingly.  I've also read that sharepoint is suppose to automatically generate the "ID" and "_webpartID" for you.  That may be the first problem.  SharePoint is not generating these ids.

Anway, here's the code.  The Urgent Care Phone number is not appearing.  Any help is appreciated:

<div class="PrimaryNumber">
 <!--CS: [PrimaryNumberOWSTEXT] Start Catalog-Item Reuse Snippet-->
 <!--SPM:<cc1:CatalogItemReuseWebPart runat="server" UseServerSideRenderFormat="True" ResultType="" NumberOfItems="1" UseSharedDataProvider="True" OverwriteResultPath="False" ResultsPerPage="1"  SelectedPropertiesJson="[&#34;PrimaryNumberOWSTEXT&#34;]" Title="Catalog-Item Reuse" Description="Use this Web Part to reuse or republish the content of an item from a catalog." MissingAssembly="Cannot import this Web Part." ID="g_c1f4fc93_ec7c_4d79_a57f_5ebbb42f52f1" __WebPartId="{c1f4fc93-ec7c-4d79-a57f-5ebbb42f52f1}">-->
 <!--SPM:<RenderFormat>-->
 <!--DC:Renders value from search without any additional formatting.-->
 <!--SPM:</RenderFormat>-->
 <!--SPM:</cc1:CatalogItemReuseWebPart>-->
 <!--CE:End Catalog-Item Reuse Snippet--> 
</div> 
<div class="UrgentCareNumber">
 <!--CS: [UrgentCarePhoneOWSTEXT] Start Catalog-Item Reuse Snippet-->
 <!--SPM:<cc1:CatalogItemReuseWebPart runat="server" UseServerSideRenderFormat="True" ResultType="" NumberOfItems="1" UseSharedDataProvider="True" OverwriteResultPath="False" ResultsPerPage="1"  SelectedPropertiesJson="[&#34;UrgenCarePhoneOWSTEXT&#34;]" Title="Catalog-Item Reuse" Description="Use this Web Part to reuse or republish the content of an item from a catalog." MissingAssembly="Cannot import this Web Part.">-->
 <!--SPM:<RenderFormat>-->
 <!--DC:Renders value from search without any additional formatting.-->
 <!--SPM:</RenderFormat>-->
 <!--SPM:</cc1:CatalogItemReuseWebPart>-->
 <!--CE:End Catalog-Item Reuse Snippet--> 
</div>      


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>