Publishing Data Items To Other Site Collections Using Cross Site Publishing In SharePoint

In this article, we will see how to configure cross site publishing features with managed navigation and how anonymous users can view the data from other site collections.

Create two site collections.

  1. Authoring site collection
  2. Publishing site collection

We will see how we can create a library in authoring site collections, configure it, publish it, and how it can be accessed from another site collection.

We will create Picture library in authoring site. Let us see an example of categorizing these pictures with multiple topics (Tags or Terms). Also, we will see how these pictures can be accessed by anonymous users who don’t have permissions to the Authoring site library. This can be achieved by restricting access to Authoring site with specific sets of people and providing access to large sets of people on the publishing site (Explained later in the section). So basically we are trying to make Authoring site as admin users site and Publishing site as Readers site.

From authoring site collection,

  1. Navigate to site collection features page and enable the cross site publishing feature and SharePoint Server Publishing Infrastructure feature.

  2. Create a term store with the following hierarchy.

  3. I have created a term set called Categories and under the term set, a category called Pictures. Under Picture term, many sub terms are added (this will be used as managed metadata/tag values for list items created in future).

    Categories

  4. Create a list or library called Pictures.

  5. Under the Pictures library, navigate to the library settings.

  6. Create a new column called item category. (Note this is the column to be mapped to the term store created above).

    1. Name the column as Item Category.

    2. Under term settings, expand the managed metadata term store and map the column to Pictures category.

      Pictures

    3. Save the column.

      Save the column

  7. Add items to the list.

  8. While adding new item, map the item to appropriate category using item category column.

    column

  9. Under Library settings, click on catalog settings (This enables the library as catalog.)

    1. Check “Enable this library as catalog option”.

    2. Enable Anonymous access (This will enable anonymous access to users under your organization).

    3. Under Catalog Item URL Fields section, select the Title/ID column to selected fields section. (Ensures unique URL to each items under the library).

    4. From the navigation hierarchy dropdown, select the managed metadata column we have created for the list. (In our case, select Item category).

    5. Now you have published your catalog and the content from this library can be accessed from other site collections.

Accessing data from publishing site

Go to Central Administration site.

  1. Navigate to “Manage service applications” under Application Management section.

  2. Click on the search service application:

    1. Go to content sources under Crawling section.
    2. Run the full crawl. (This will in turn create necessary indexes for the library),

      Run the full

Note: The publishing site will populate the data only if Full Crawl/Incremental crawl runs. So, crawl should run periodically for creating indexes. Once the first crawl completes, the library will be available on the publishing site’s catalog connection section.

From Publishing Site collection,

  1. Navigate to site permissions from site settings page.

    1. Click on grant permissions.

    2. Provide access to “everyone”. (Note: The permissions for users for authoring site can only be restricted to Admins or specific sets of people).

      everyone

  2. Navigate to site collection features page and enable the publishing feature.

  3. Navigate to Navigation under Look and Feel section.

    1. Select managed navigation under global and current navigations.

    2. From term set section, under the publishing site collection create site navigation term set if not created. (In our case, SPMySite Navigation).

    3. Then click on Ok.

      SPMySite

  4. Navigate to Manage catalog connections under site settings.

  5. Click on “Connect to catalog” (This will list down all the catalogs published from other site collections),

    Connect to catalog

    1. From the list available, click Connect on the picture library listed.

    2. Under Catalog Source Settings, you could see the drop down (In our case, Item category column) and root term hierarchy values are set under navigation settings section. (Note: If not set, please select the managed metadata column we have created and the category we have created under metadata store).

      metadata

    3. Select the include root term check box. (This will enable the term set hierarchy to be used in building URLs. For example in our case, the URL to be used to show the items will be ~/sites/SPMySite/Pictures/[Title]).

    4. Click on Ok.

    5. The category page and item page will be created by default to show the library items. (Note: If you wish to develop custom components and display the values, then create new pages and map it. The new pages implementation is not explained in this section).

      category page

    6. Once saved, if you view the Manage Catalog Connection section it will show the catalog name along with disconnect option.

      catalog

      (Note: You can disconnect anytime to stop sharing the content to other sites.)

  6. Then on top of the site, you can see the top navigation populated.

    General

  7. The following shows the pictures from the Authoring site (The following snapshot is an catalog page. On clicking of any item, it will show the image details - item pages).

    run

So, we have successfully pushed the content on to Authoring site and populated the same on publishing site. Actually this works using search driven architecture. The data from the Authoring site is not pushed to Publishing site. But, publishing site reads the data from Authoring site using search indexes. The category and index pages uses search web parts to show the data.

Read more articles on SharePoint:

Up Next
    Ebook Download
    View all
    Learn
    View all