What is cross site publishing?
Using this feature, you can create one or more authoring site collections to store content and create one or more publishing site collections to design and show the content from the authoring site collection, using a catalog connection with the help of SharePoint search.
How it works
- Content has been created in a SharePoint list and the libraries shared as a catalog, resulting in one source authoring the site collections.
- Search the Service, crawl the content from the authoring site collection, and build the index.
- User adds content, and searches the web part to query the content from the search in publishing the site collections.
Uses and benefits of CPS
- Main advantage is the internet sites; i.e., mostly the public-facing sites, use this feature to make content management easy.
- Intranet, Extranet and bilingual sites can use this feature for both internal and external users.
Types of contents
You can store different types of content in the libraries and lists in the authoring site collection. By sharing these libraries and lists as catalogs, the data that they contain can be reused in one or more publishing site collections. By default, only HTML content is indexed and returned by the search system. Non-HTML content, such as Word documents and PDFs, is not stored in the index and must be referenced directly. The following list describes the different types of content that you can use in an authoring site collection.
- Pages library (approval Workflow and content scheduling)
- Asset library (images, videos, and audio files)
- Lists (you are able to store any kind of data)
- Document library (storing Word and PDF documents, one can consider BLOB)
Let us see how to implement the cross site publishing feature in SharePoint .
Open SharePoint central administration -> Application management -> Create a site collection.
While creating a site collection, create an authoring site as a product catalog or a publishing portal.
Create a two site collection — one for authoring and another for publishing.
After the two sites are created open an authoring site collection.
Create a Custom list to fill up some content.
Now, I am going to create a catalog connection for this list.
Go to List -> List settings.
Under General settings -> click catalog settings.
Check “Enable this library as a catalog”.
Enable “anonymous access”, as it helps to view the content to the anonymous users.
Catalog ITEM URL fields.
Now, it’s time to run the “Search service application” to index the content from authoring the site collection.
Click content sources.
Start Full Crawl.
After a successful crawl, open a “Publishing site collection”.
Navigate to the site settings -> create a catalog connection.
Click Site collection features -> Activate the Cross-site collection publishing.
Under site administration -> click manage catalog connections.
Click connect to the catalog.
Click connect on “authoring connection”.
In my scenario, I am not integrating a catalog with the terms.
Click OK to complete the connection creation.
Add a content search web part in a page.
After adding, click on edit web part.
Click change query to connect the catalog connection from authoring.
Click Switch to advanced mode.
Pick an authoring catalog connection from the result source.
Provide the value for the number of items to show, as follows:
Select the display templates for the control and the item.
Enable the property mappings to map the columns from the search index.
Here is the final result.