階段 5: 將您的發佈網站連線至 SharePoint Server 中目錄Stage 5: Connect your publishing site to a catalog in SharePoint Server

摘要:了解如何將發佈網站連線至在 SharePoint Server 2016 目錄。Summary: Learn how to connect your publishing site to a catalog in SharePoint Server 2016.

注意

大部分的這一系列中所述的功能是僅適用於 SharePoint Online 中的私人每個網站集合。Most of the features described in this series are available only for private sites collections in SharePoint Online.

快速概觀Quick overview

我們所述先前文章中我們如何建立稱為 「 Contoso 發佈入口網站集合 (階段 1: 建立跨網站發佈 SharePoint Server 中的網站集合),並同時啟用 [產品] 清單作為目錄階段 3: 如何啟用清單作為目錄 in SharePoint ServerIn previous articles, we described how we created a Publishing Portal Site Collection called Contoso (Stage 1: Create site collections for cross-site publishing in SharePoint Server), and also enabled the Products list as a catalog Stage 3: How to enable a list as a catalog in SharePoint Server.

現在我們將發佈網站連線到我們的目錄。在本文中,我們將說明:We're now going to connect the publishing site to our catalog. In this article, we'll describe:

整個此階段中,我們將不會有太多執行因為許多設定已預先設定與我們並未按一下階段 3: 如何啟用清單作為目錄 in SharePoint Server。但是,將引入許多新概念,並這些功能將說明當我們移。Throughout this stage, we won't have much clicking to do because many the settings have already been preconfigured with what we did in Stage 3: How to enable a list as a catalog in SharePoint Server. But, many new concepts will be introduced, and these features will be explained as we go.

若要協助保護您導向,我們將使用這些圖示:To help keep you oriented, we'll use these icons:

圖示學習 表示一節將提供的概念性資訊。means the section will provide conceptual information.

圖示作法 表示一節提供執行工作的程序性步驟。means the section will provide procedural steps for performing a task.

啟動階段 5Start stage 5

[目錄來源設定] 頁面上的相關About the Catalog Source Settings page

圖示學習

[目錄來源設定] 頁面上是重要] 頁面上,因為這是您在其中指定如何在發佈網站應該連線至您的目錄。如果您在伺服器陣列上有數個型錄,每個目錄會有其專屬目錄來源設定] 頁面。The Catalog Source Settings page is an important page, because this is where you specify how your publishing site should be connected to your catalog. If you have several catalogs on your farm, each catalog will have its own Catalog Source Settings page.

在我們 Contoso 網站情況下,我們只能有一個目錄、 [產品] 目錄。因此,我們想要移至 [產品] 目錄的 [目錄來源設定] 頁面上。In our Contoso site scenario, we only have one catalog, the Products catalog. Therefore, we want to go to the Catalog Source Settings page for the Products catalog.

請記住,在階段 3: 如何啟用清單作為目錄 in SharePoint Server其中我們學會如何啟用清單作為目錄,我們將啟用為目錄此文件庫] 核取方塊?在此階段中,SharePoint 會搜尋文件庫或清單其中已選取此核取方塊。Remember, in Stage 3: How to enable a list as a catalog in SharePoint Server where we learned how to enable a list as a catalog, and we set a check box Enable this library as a catalog ? Well, in this stage, SharePoint will search for libraries or lists where this check box was selected.

如何取得目錄來源設定] 頁面上How to get to the Catalog Source Settings page

圖示作法

  1. 在 Contoso 網站上,移至 [網站設定 --> 管理目錄連線On the Contoso site, go to Site settings --> Manage catalog connections.

  2. 在 [管理目錄連線] 頁面上按一下 [連線到目錄。On the Manage catalog connections page, click Connect to a catalog.

    連線至目錄

我們產品] 清單會顯示為可用的目錄。若要連線至其,按一下 [連線]。Our Products list is displayed as an available catalog. To connect to it, click Connect.

 ![Connect](../media/OTCSP_Connect.png)

> [!TIP]
> If you click **Connect to a catalog** and there aren't any available catalogs, this might be because you have not yet crawled the catalog, as demonstrated in [Stage 4: Set up search and enable the crawling of your catalog content in SharePoint Server](stage-4-set-up-search-and-enable-the-crawling-of-your-catalog-content.md). 

現在我們已成功是我們產品目錄瀏覽至 [目錄來源設定] 頁面上該是時候來指定目錄應該如何整合到我們 Contoso 網站。Now that we've successfully navigated to the Catalog Source Settings page for our Products catalog, it's time to specify how the catalog should be integrated into our Contoso site.

在 [目錄來源設定] 頁面上指定的設定Specify the settings on the Catalog Source Settings page

下表概述我們必須指定目錄來源設定] 頁面的設定。如果您想要移至子區段官方、 使用"移至 「 連結。This table provides an overview of the settings we must specify on the Catalog Source Settings page. If you want to go straight to a subsection, use the "Go to" links.

ToTo 移至Go to 移至Go to
指定目錄整合Specify Catalog Integration
指定目錄整合的相關About specifying Catalog Integration
如何在指定目錄整合How to specify Catalog Integration
指定 「 完整的網站 」 導覽Specify the full site navigation
需指定完整的網站導覽About specifying the full site navigation
如何指定完整的網站導覽How to specify the full site navigation
指定產品] 頁面的 URL 詳細的資料Specify URL details for a product page
關於指定的產品] 頁面的 URL 詳細資料About specifying URL details for a product page
如何將指定的產品] 頁面的 URL 詳細資料How to specify URL details for a product page
指定的類別頁面與項目頁面Specify a Category Page and an Item Page
需指定類別頁面與項目About specifying a Category Page and an Item Page
如何指定類別頁面與項目How to specify a Category Page and an Item Page

指定目錄整合Specify Catalog Integration

指定目錄整合的相關About specifying Catalog Integration

圖示學習

針對此設定指定的目錄內容應該如何整合在發佈網站。是否必須另外指定目錄設定] 頁面上設定會影響選取項目。For this setting, specify how the catalog content should be integrated in your publishing site. Your selection will effect whether you have to specify additionally settings on the Catalog Settings Page.

如何在指定目錄整合How to specify Catalog Integration

圖示作法

在 [連線整合] 區段中,保持整合至 「 我的網站目錄的設定是:選取In the Connection Integration section, keep the setting Integrate the catalog into my site as it is: Selected.

連線整合

我們會保持選取此設定的原因是因為我們想要使用產品階層中的字詞組 (我們產品目錄網站集合 」) 中的條款我們 Contoso 網站的瀏覽窗格中。The reason we are keeping this setting selected is because we want to use the terms from the Product Hierarchy term set (from our Product Catalog Site Collection) in the navigation of our Contoso site.

已說明的連線整合

保持選取此設定可讓我們定義易記的 Url,並具有類別頁面與項目自動建立我們 (我們將會說明類別頁面與項目功能更詳細地更新版本)。Keeping this setting selected enables us to define user-friendly URLs, and have a category page and an item page automatically created for us (we'll describe what a category page and an item page is in more detail later).

指定 「 完整的網站 」 導覽Specify the full site navigation

需指定完整的網站導覽About specifying the full site navigation

圖示學習

使用 [發佈入口網站集合範本,這是什麼我們建立時使用我們在此網站建立的網站階段 1: 建立跨網站發佈 SharePoint Server 中的網站集合,將預設有受管理瀏覽選取作為其瀏覽方法。受管理的導覽是 SharePoint 伺服器 2016,可讓您定義及維護網站上的導覽使用字詞組中導入新瀏覽方法。A site that was created by using the Publishing Portal Site Collection template, which is what we used when we created this site in Stage 1: Create site collections for cross-site publishing in SharePoint Server, will by default have Managed navigation selected as its navigation method. Managed navigation is a new navigation method introduced in SharePoint Server 2016, which lets you define and maintain the navigation on your site by using term sets.

若要檢視您的網站瀏覽已設定:To view how the navigation of your site is set up:

  1. 移至 [網站設定->導覽Go to Site settings --> Navigation.

  2. 確認下列事項:Verify that:

  • 會選取受管理導覽Managed Navigation is selected.

  • 網站的導覽字詞組會指定為定義在您的網站的導覽字詞組。The Site Navigation term set is specified as the term set that defines the navigation on your site.

    受管理導覽

我們現在要建立完整的網站導覽整合產品階層中的字詞組 (產品目錄網站集合) 到網站導覽字詞組中的條款。We are now going to build the full site navigation by integrating terms from the Product Hierarchy term set (from the Product Catalog Site Collection) into the Site Navigation term set.

 ![Pin Terms](../media/OTCSP_PinTerms.gif)

在我們的案例中,我們 Contoso 網站的導覽結構將是非常簡單將中進行的產品階層的字詞組只能從字詞。In our scenario, the navigation structure of our Contoso site will be very simple, as it'll be made up of the terms from the Product Hierarchy term set only.

如何指定完整的網站導覽How to specify the full site navigation

圖示作法

若要指定完整的網站導覽,我們已指定:To specify the full site navigation, we have to specify:

  • 導覽階層Navigation Hierarchy

  • 導覽位置Navigation Position

  • 導覽固定Navigation Pinning

    導覽階層Navigation Hierarchy

選取 [] 欄中的分類導覽項目已設定包含的資訊。請記得在階段 3: 如何啟用清單作為目錄 in SharePoint Server、 我們選取項目類別導覽階層] 設定時?設定會自動遷往此頁面。因此,我們將會保留所選取的項目類別是以。The Select the column that categorizes items for navigation setting already contains information. Remember in Stage 3: How to enable a list as a catalog in SharePoint Server, when we selected the Item Category for Navigation Hierarchy setting? That setting is automatically carried over to this page. Therefore, we'll keep the selected Item Category as is.

導覽階層 2

另請記住階段 2: 清單內容匯入至 SharePoint Server 中的產品目錄網站集合、 我們顯示項目的類別] 欄中如何繫結至產品階層的字詞組。現在我們會指定應啟動目錄瀏覽產品階層字詞組中的位置。Also remember Stage 2: Import list content into the Product Catalog Site Collection in SharePoint Server, where we showed how the Item Category column is tied to the Product Hierarchy term set. Now we will specify from where in the Product Hierarchy term set the catalog navigation should start.

  1. 在 [階層根目錄字詞] 區段中按一下 [標籤] 圖示。顯示產品階層字詞的對話方塊設定隨即開啟。In the Root term of hierarchy section, click the label icon. A dialog box showing the Product Hierarchy term set opens.

  2. 選取 「 電子"。Select "Electronics".

    我們正在選取此因為我們想要從字詞組目錄瀏覽窗格中要包含的所有字詞。We're selecting this because we want all terms from the term set to be included in the catalog navigation.

    電子

  3. 未選取 [包含在網站導覽的根目錄字詞我們不想要顯示在網站導覽中的 「 電子"的根目錄字詞。Don't select Include root term in site navigation as we don't want the root term "Electronics" to be shown in the site navigation.

我們最終的導覽階層設定會類似:Our final Navigation Hierarchy settings will be like this:

最終導覽階層

瀏覽位置Navigation Position

瀏覽位置] 可定義在目前的網站瀏覽,應該整合目錄瀏覽的位置。換句話說,其中、網站導覽字詞組,產品階層的字詞集應該整合。為 Contoso 網站只會包含目錄頁面,我會保留新增至導覽根目錄選取設定。Navigation Position defines where, in the current site navigation, the catalog navigation should be integrated. In other words, where, in the Site Navigation term set, the Product Hierarchy term set should be integrated. As the Contoso site will only contain catalog pages, I keep the setting Add to navigation root selected.

導覽位置

瀏覽固定Navigation Pinning

瀏覽固定會決定是否應在您的網站瀏覽反映對產品階層的字詞組產品目錄網站集合中所做的變更。Navigation Pinning determines whether changes that are made to the Product Hierarchy term set in the Product Catalog Site Collection should be reflected on your site navigation.

如果我們決定要變更我們產品階層字詞集,例如從 「 印表機、 掃描器和傳真 」 的字詞名稱變更為"印表機、 掃描器&傳真",我們想讓這個反映在我們的網站導覽。這會發生,網站瀏覽至 Pin 條款] 核取方塊應保持選取狀態。If we decide to change our Product Hierarchy term set, for example by changing the name of a term from "Printers, scanners and fax" to "Printers, scanners & fax", we want this to be reflected on our site navigation. For this to occur, the Pin terms to site navigation check box should remain selected.

導覽固定

指定產品] 頁面的 URL 詳細的資料Specify URL details for a product page

關於指定的產品] 頁面的 URL 詳細資料About specifying URL details for a product page

圖示學習

當指定的產品] 頁面的 URL 詳細資料,首先必須決定您想要在訪客登陸時所要瀏覽至某項特定產品的頁面。若要這樣做後兩個選項:When specifying URL details for a product page, you first have to decide which page that you want your visitors to land on when they're browsing to a specific product. To do this, you've two options:

  • 訪客可以登陸內發佈入口網站頁面上。Visitors can land on a page within the publishing portal.

  • 訪客可以登陸產品目錄網站集合中的清單項目。Visitors can land on the list item in the Product Catalog Site Collection.

我們建立的彩色、 吸引人頁面以展示適用產品與 Contoso,客戶使用網站。我們同樣想我們頁面有易記的 Url。因此,我們將選擇的第一個選項。We're building a customer-facing website for Contoso, with colorful, attractive pages to showcase our products. We similarly want our pages to have friendly URLs. Therefore, we'll choose the first option.

如果我們所建置的公司內部網站,其中我們要讓員工得以我們目錄中檢視的實際清單項目,我們會選擇第二個選項。If we were building an internal company website, where we wanted employees to view the actual list items in our catalog, we'd have chosen the second option.

重要

當指定的產品] 頁面的 URL 設定、 安全性設定及網站存取設定保持相同。訪客只會看到什麼您已授與這些權限若要查看。When specifying URL settings for a product page, your security settings and site access settings remain the same. Visitors will only see what you've granted them permissions to see.

如何將指定的產品] 頁面的 URL 詳細資料How to specify URL details for a product page

圖示作法

若要指定產品] 頁面的 URL 詳細資料,您必須指定:To specify the URL details for a product page, you have to specify:

  • 目錄項目 URL 行為Catalog Item URL Behavior

  • 目錄項目 URL 格式Catalog Item URL Format

    目錄項目 URL 行為Catalog Item URL Behavior

若要指定目錄項目 URL 行為,保留已選取 [讓相對於此網站的 Url設定。To specify Catalog Item URL Behavior, keep the Make URLs relative to this site setting selected.

由保留此設定時, 選取某項特定產品我們 Contoso 訪客瀏覽],他們將會前往直接在發佈網站集合的頁面。By keeping this setting selected, when our Contoso visitors browse for a specific product, they'll be taken directly to a page in the publishing site collection.

URL 行為

目錄項目 URL 格式Catalog Item URL Format

目錄項目 URL 格式定義如何建置至 [產品] 頁面上的易記 URL。我們尚未指定此中階段 3: 如何啟用清單作為目錄 in SharePoint Server、 我們選取目錄項目 URL 欄位時。Catalog Item URL Format defines how to build a friendly URL to the product page. We have already specified this in Stage 3: How to enable a list as a catalog in SharePoint Server, when we selected Catalog Item URL Fields.

在 Contoso 案例中,我們將會保留使用目錄來源所提供的預設 URL 格式選取設定。這表示 [產品] 頁面的 URL 將會包含從ProductCatalogGroupNumberOWSTEXT、 和ProductCatalogItemNumberOWSTEXTmanaged 屬性的值。In our Contoso scenario, we'll keep the setting Use the default URL format provided by the catalog source selected. This means that the URL to the product page will contain values from the managed properties ProductCatalogGroupNumberOWSTEXT, and ProductCatalogItemNumberOWSTEXT.

URL 格式

注意

如果 managed 的屬性名稱混淆,請參閱從 managed 屬性集的網站欄功能的?,其中說明如何自動建立的屬性具名。If the managed property names are confusing, see From site column to managed property - What's up with that?, which describes how automatically created properties are named.

指定的類別頁面與項目頁面Specify a Category Page and an Item Page

需指定類別頁面與項目About specifying a Category Page and an Item Page

圖示學習

當您以目錄的格式顯示資訊時,請版面配置與結構應該是一致跨目錄。例如,您要中左上角,後面接著表格的產品規格,例如的高度和產品的色彩顯示某項產品的圖像。相同適用於類別頁面。例如,您想讓做為所有照相機的頁面配置相同的所有電視的頁面。When you display information in a catalog format, the layout and structure should be consistent across the catalog. For example, you want to display the image of a product in the upper-left corner, followed by a table of product specifications, such as the height and color of the product. The same applies to category pages. For example, you want the page for all TVs to have the same layout as the page for all cameras.

若要避免擁有建立數個頁面的每個產品以及每個類別的數個頁面,您可以使用一個範本] 頁面上每個。SharePoint 中的項目頁面類別頁面提供此用途。To avoid having to create several pages for each product, and several pages for each category, you can use one template page for each. In SharePoint, an Item Page and a Category Page serve this purpose.

在我們 Contoso 網站情況下,我們將兩者都不會建立項目] 頁面上,也不應我們建立類別頁面如 SharePoint 會自動執行此動作的我們。In our Contoso website scenario, we'll neither create an Item Page, nor shall we create a Category Page as SharePoint will do this for us automatically.

如何指定類別頁面與項目How to specify a Category Page and an Item Page

圖示作法

  1. 類別頁面] 區段中保留 [建立新的頁面選取。依照此 SharePoint 會自動建立新的類別頁面。In the section Category Page, keep Create a new page selected. By doing this, SharePoint automatically creates a new category page.

    目錄頁面

  2. 在 [項目頁面] 區段中保留 [建立新的頁面選取。依照此 SharePoint 會自動建立新的項目頁面。In the section Item Page, keep Create a new page selected. By doing this, SharePoint automatically creates a new item page.

    項目頁面

以下是我們最終目錄來源設定] 頁面上將會類似:Here's what our final Catalog Source Settings page will be like:

 ![Final Catalog Source Settings Page](../media/OTCSP_FinalCatalogSourceSettingsPage.png)

按一下 [確定] 並觀賞發生還是相當酷事項 !Click OK, and watch some cool things occur!

按一下 [確定] 按鈕以連線到目錄時會發生什麼情況What happens when I click the OK button to connect to a catalog

我們 Contoso 網站導覽現在包含產品階層的字詞組中的條款。Our Contoso site navigation now includes terms from the Product Hierarchy term set.

確定導覽

如果您瀏覽至 [音訊] 頁面上,您會看到顯示三個 MP3 產品。If you browse to the Audio page, you'll see three MP3 products displayed.

確定音訊

如果您瀏覽至 [電腦] 頁面上,您會看到顯示三個筆記型電腦產品。If you browse to the Computers page, you'll see three laptop products displayed.

確定電腦

此系列中更新的文章將說明為何正確的已分類的產品"神奇地"顯示當我們瀏覽到不同的類別。現在,我們檢查某項特定產品。A later article in this series will explain why the correct categorized products "magically" appear as we browse through the different categories. For now, let's examine a specific product.

確定產品

如您所見,目前是不完全漂亮來看,但產品的相關資訊會顯示在頁面和易記的 URL。As you can see, currently it's not exactly pretty to look at, but information about the product is displayed on the page, and there is a friendly URL.

此外,從產品階層字詞字詞組整合至之網站的導覽字詞組。如果您想要更詳細地可以看到,請移至網站設定->字詞庫管理Also, the terms from the Product Hierarchy term set are integrated into the Site Navigation term set. If you want to see this in more detail, go to Site settings --> Term store management.

確定網站導覽

和兩個新頁面新增至頁面庫。如果您想要更詳細地可以看到,請移至網站內容->頁面And two new pages are added to the Pages library. If you want to see this in more detail, go to Site contents --> Pages.

確定頁面

很酷大量有剛好在我們的 Contoso 網站上。現在該是時候來啟動改善我們頁面的外觀。A lot of cool things have just happened on our Contoso website. Now it is time to start improving the appearance of our pages.

本系列中的下一篇文章Next article in this series

階段 6: 上傳並將新的主版頁面套用到 in SharePoint Server 發佈網站Stage 6: Upload and apply a new master page to a publishing site in SharePoint Server

另請參閱See also

概念Concepts

將發佈網站連線到 SharePoint Server 中目錄Connect a publishing site to a catalog in SharePoint Server