階段 8: 將類別頁面和目錄項目頁面指派給 SharePoint Server 中的字詞Stage 8: Assign a category page and a catalog item page to a term in SharePoint Server

摘要:了解如何將類別頁面和目錄項目頁面指派給 SharePoint Server 2016 中某個字詞。Summary: Learn how to assign a category page and a catalog item page to a term 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

在這一系列的上一個階段我們:In previous stages of this series we:

在此階段中,我們將指派這些新建的頁面為網站的導覽字詞組中的條款。In this stage, we'll assign these newly created pages to the terms within the Site Navigation term set.

在本文中,您將了解:In this article, you'll learn:

啟動階段 8Start stage 8

請先將類別頁面和目錄項目頁面指派給字詞的工作之前,我們討論有點深入了解一些相關的功能。Before we begin the task of assigning a category page and a catalog item page to a term, let's discuss a bit more about some of the features involved.

關於受管理導覽About managed navigation

SharePoint Server 2016 中已採用受管理的導覽。此導覽方法可讓您定義及維護網站導覽使用字詞組。Managed navigation was introduced in SharePoint Server 2016. This navigation method lets you define and maintain your site navigation by using term sets.

其中一個使用受管理的導覽的優點是它所分隔網站導覽從內容的位置。使用受管理的導覽,它不是內容的您定義的位置中會出現在內容、 導覽,但您如何標記內容字詞組中的詞彙的位置。例如,較早版本的 SharePoint,若您想要新增頁面下 [關於我們公司"對之前新增該頁面的 [下 [關於我們公司"分支中您的內容。使用受管理的導覽,您可以新增頁面至最適合您的分支。標記了字詞,該頁面並使用搜尋網頁組件,它會顯示在瀏覽窗格中的正確位置。One of the benefits of using managed navigation is that it separates the site navigation from the location of your content. By using managed navigation, it's not the location of your content that defines where in the navigation your content will appear, but how you tag your content with terms from a term set. For example, in earlier versions of SharePoint, if you wanted to add a new page under "About our company," you had to add that page under the "About our company" branch within your content. By using managed navigation, you can add a page to the branch that makes the most sense to you. By tagging that page with a term, and using Search Web Parts, it will appear in the correct place in the navigation.

受管理導覽的其他優點是它會建立易記的 Url。在舊版的 SharePoint,頁面的 URL 包含的頁面庫及任何資料夾內的文件庫的參照例如: http://www.contoso.com/pages/products/computers/laptops.aspx 。使用受管理的導覽,Url 根據例如磁碟機您網站瀏覽之字詞組中的條款: http://www.contoso.com/computers/laptopsAnother benefit of managed navigation is that it creates friendly URLs. In earlier versions of SharePoint, the URL to a page contained a reference to the Pages library and any folders within that library, for example: http://www.contoso.com/pages/products/computers/laptops.aspx . By using managed navigation, URLs are based on the terms in the term set that drives your site navigation, for example: http://www.contoso.com/computers/laptops .

階段 3: 如何啟用清單作為目錄 in SharePoint Server清楚產品階層的字詞組中的條款用來建立的易記 URL 的方式。Stage 3: How to enable a list as a catalog in SharePoint Server explained how terms from the Product Hierarchy term set are used to create a friendly URL.

重要

受管理的導覽未繫結至的發佈方法及可用的作者在就地以及跨網站發佈功能。如需詳細資訊,請參閱 < SharePoint Server 中的受管理導覽的概觀Managed navigation is not tied to a publishing method, and can be used both for author-in-place and for cross-site publishing. For more information, see Overview of managed navigation in SharePoint Server.

類別頁面和目錄項目頁面的相關About the category page and the catalog item page

當您以目錄的格式顯示資訊時,請的版面配置與類別頁面結構應該是一致跨目錄。例如,在 Contoso 案例中,我們想要有做為所有攝影機類別頁面配置相同的所有 MP3 播放器的 [類別] 頁面。When you display information in a catalog format, the layout and structure of the category pages should be consistent across the catalog. For example, in our Contoso scenario, we want the category page for all MP3 players to have the same layout as the category page for all camcorders.

兩個類別

此外,不論有哪些類型的產品訪客檢視、 目錄項目頁面應一致。例如一律顯示某項產品的映像中左上角,後面接著表格的產品規格。Also, regardless of what type of product a visitor views, the catalog item page should be consistent. For example always display an image of a product in the upper-left corner, followed by tables of product specifications.

兩個產品

藉由結合受管理導覽與類別頁面和目錄項目頁面,您不需要建立數個頁面目錄類別或目錄項目。例如,在 Contoso 案例中,我們將使用僅使用我們在建立的兩個頁面階段 7: 上傳版面配置與 SharePoint server 發佈網站中建立新頁面By combining managed navigation with category pages and catalog item pages, you don't have to create several pages for your catalog categories or for your catalog items. For example, in our Contoso scenario, we'll use only use the two pages we created in Stage 7: Upload page layouts and create new pages in a publishing site in SharePoint Server.

讓後該理論上,[下一步] 區段中我們將顯示如何您可以這麼做。So, after all that theory, in the next section, we'll show you how you can do this.

如何將類別頁面和目錄項目頁面指派給字詞How to assign a category page and a catalog item page to a term

階段 7: 上傳版面配置與 SharePoint server 發佈網站中建立新頁面,我們建立新的類別頁面及新的目錄項目] 頁面。現在我們想要建立關聯中的字詞與這些頁面設定磁碟機網站瀏覽]。In Stage 7: Upload page layouts and create new pages in a publishing site in SharePoint Server, we created a new category page and a new catalog item page. Now we want to associate these pages with the terms in the term set that drives site navigation.

  1. 在 Contoso 網站上,移至網站設定] 及 [字詞儲存管理On the Contoso site, go to Site settings and then Term store management.

  2. 在 [分類法字詞庫] 區段中按一下 [字詞,例如 「 音訊 」,然後再按一下[字詞導向頁面] 索引標籤。In the TAXONOMY TERM STORE section, click a term, for example "Audio," and then click the TERM-DRIVEN PAGES tab.

    分類法字詞庫

目標頁面上設定目錄項目頁面設定] 區段中,有四個參照指向兩個頁面:類別 Electronics.aspxCatalogItem Electronics.aspxIn the Target Page Settings and Catalog Item Page Settings sections, there are four references pointing to two pages: Category-Electronics.aspx and CatalogItem-Electronics.aspx .

 ![Automatically Assigned Pages](../media/OTCSP_AutomaticallyAssignedPages.png)

請記得階段 5: 將您的發佈網站連線至 SharePoint Server 中目錄、 我們我們目錄連線我們發佈網站時?在該階段中,將類別頁面和目錄項目頁面所自動建立及新增至頁面庫。我們並未涵蓋階段 5 是這些頁面的參照已新增到此字詞組,螢幕擷取畫面上面所示。在下一個步驟中我們將會使其指向我們新建的類別頁面和目錄項目頁面變更這些參考。Remember Stage 5: Connect your publishing site to a catalog in SharePoint Server, when we connected our publishing site to our catalog? In that stage, a category page and a catalog item page were automatically created and added to the Pages library. What we didn't cover in Stage 5 is that references to these pages were added to this term set, as shown in the screen shot above. In the next steps we'll change these references so they point to our newly created category page and catalog item page.

  1. 在 [目標] 頁面設定] 區段中執行下列動作:In the Target page settings section, do the following:

  2. [變更這個字詞的目標頁面] 區段中按一下 [瀏覽]。In the Change target page for this term section, click Browse.

  3. 在 [選取資產] 對話方塊中,按一下 [頁面],然後選取您要套用 [類別] 頁面。在我們的案例中,這是ContosoCategoryPage.aspxIn the Select an Asset dialog box, click Pages, and then select the category page that you want to apply. In our scenario, this is ContosoCategoryPage.aspx.

    選取目錄頁面

藉由設定此參考 (英文)、 當訪客瀏覽至 「 音訊 」 在 Contoso 網站] 頁面ContosoCategoryPage.aspx會用來顯示資訊。請務必了解訪客將不會看到的頁面名稱ContosoCategoryPage.aspx ,但改用易記的 URL。易記的 Url 的詳細資訊將會是中提供關於類別頁面的易記 URL、 本文稍後的。By setting this reference, when visitors browse to "Audio" on the Contoso site, the page ContosoCategoryPage.aspx will be used to display information. It is important to understand that visitors won't see the page name ContosoCategoryPage.aspx , but instead a friendly URL. More information about friendly URLs will be provided in About the friendly URL for category pages, later in this article.

  1. [變更這個字詞的子系目標頁面] 區段中,重複步驟 3a 和 3b。透過設定此參考資料,當訪客瀏覽至子字詞的 「 音訊 」,例如"喇叭"、 頁面ContosoCategoryPage.aspx用來顯示資訊。In the Change target page for children of this term section, repeat steps 3a and 3b. By setting this reference, when visitors browse to a child term of "Audio," for example "Speakers," the page ContosoCategoryPage.aspx is used to display information.

    目標頁面設定

  2. 在 [目錄項目頁面設定] 區段中執行下列動作:In the Catalog Item Page Settings section, do the following:

  3. 此類別的變更目錄項目頁面] 區段中按一下 [瀏覽]。In the Change Catalog Item Page for this category section, click Browse.

  4. 在 [選取資產] 對話方塊中,按一下 [頁面],然後選取您要套用 [類別] 頁面。在我們的案例中,這是ContosoCatalogItemPage.aspxIn the Select an Asset dialog box, click Pages, and then select the category page that you want to apply. In our scenario, this is ContosoCatalogItemPage.aspx.

    選取目錄項目頁面

透過設定此參考訪客瀏覽至已標記了字詞 「 音訊、"[ ContosoCatalogItemPage.aspx ] 頁面上的項目時將用來顯示資訊。By setting this reference, when visitors browse to an item that is tagged with the term "Audio," the page ContosoCatalogItemPage.aspx will be used to display information.

  1. 在 [變更目錄項目] 頁面上的這個字詞的子系] 區段中重複步驟 4a 和 4b。透過設定此參考 (英文)、 當訪客瀏覽至已標記的 「 音訊 」,例如"喇叭"、 子字詞的項目頁面ContosoCatalogItemPage.aspx會用來顯示資訊。In the section Change Catalog Item Page for children of this term, repeat steps 4a and 4b. By setting this reference, when visitors browse to an item that is tagged with a child term of "Audio," for example "Speakers," the page ContosoCatalogItemPage.aspx will be used to display information.

    項目頁面設定

  2. 針對您要指派類別頁面與項目詳細資料] 頁面上的所有字詞重複步驟 2 到 4。在我們的案例中,我們將進行網站導覽字詞內的所有字詞集。Repeat steps 2 - 4 for all terms to which you want to assign a category page and an item details page. In our scenario, we'll do this to all terms within the Site Navigation term set.

    所有字詞

之後將新的類別頁面和目錄項目頁面套用到所有字詞,您可以瀏覽至要確認正確的頁面已使用類別頁面。在我們的案例中,當我們瀏覽至 「 音訊 」、 沒有查看有多少。After applying the new category page and catalog item page to all terms, you can browse to a category page to verify that the correct page is being used. In our scenario, when we browse to "Audio," there's not much to see.

 ![Audio Page](../media/OTCSP_AudioPage.png)

這是很好,因為我們建立類別頁面中的時階段 7: 上傳版面配置與 SharePoint server 發佈網站中建立新頁面,我們建立的空白頁面。若要顯示的內容,我們必須新增搜尋網頁組件。我們將說明如何執行這項作業中下一篇文章。This is good, because when we created a category page in Stage 7: Upload page layouts and create new pages in a publishing site in SharePoint Server, we created an empty page. To display content, we'll have to add Search Web Parts. We'll explain how to do this in the next article.

類別頁面的易記 URL 的相關About the friendly URL for category pages

當您使用受管理的導覽時,請參閱訪客的易記 Url 由組成磁碟機網站導覽字詞組中的條款。若要查看如何易記 Url 由組成,在 [字詞庫管理工具] 頁面上按一下 [字詞,例如 「 音訊 」,然後再按一下[字詞導向頁面] 索引標籤。When you use managed navigation, the friendly URLs that visitors see are composed of the terms from the term set that drives site navigation. To see how friendly URLs are composed, on the Term Store Management Tool page, click a term, for example "Audio," and then click the TERM-DRIVEN PAGES tab.

易記的 URL 會顯示在 [設定此字詞的易記 URL ] 區段中。The friendly URL is displayed in the Configure Friendly URL for this term section.

設定易記的 URL

同樣地,當您按一下 ["汽車音響 」,您會看見此頁面的易記 URL。Similarly, when you click on "Car audio," you'll see the friendly URL for this page.

設定易記的 URL

如果您想要變更的易記 URL,例如從 「 音訊"到"音訊播放程式,「 您就應該變更實際字詞本身擷取。如此一來、 易記的 URL 與用來標記內容的字詞會保持一致。If you want to change a friendly URL, for example from "audio" to "audio players," you should change the actual term itself. That way, the friendly URL and the term that is used to tag your content will remain consistent.

如果這有點困惑,不要擔心。我們將更多說明相關搜尋網頁組件下一篇文章中的運作方式.If this was somewhat confusing, don't worry. We'll explain more about how Search Web Parts work in the next article..

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

階段 9: 設定內容搜尋網頁組件的 SharePoint Server 中的類別頁面上的查詢Stage 9: Configure the query in a Content Search Web Part on a category page in SharePoint Server

另請參閱See also

概念Concepts

SharePoint Server 中受管理導覽的概觀Overview of managed navigation in SharePoint Server

將類別頁面和目錄項目頁面指派給 SharePoint Server 中的字詞Assign a category page and a catalog item page to a term in SharePoint Server

其他資源Other Resources

規劃 SharePoint 發佈網站中顯示目錄內容Plan to show catalog content in SharePoint publishing sites