Add Custom Taxonomy Term To Site Pages In SharePoint 2013

Here are the steps: 

Step 1: Create Enterprise wiki site.

Go to central admin, then Create new site collection. When creating new site collection select Template as “Enterprise Wiki” & experience version 2013.

Enterprise Wiki

Step 2: Create New Term Group.

Go to Term Store Management. In this example create new Term Group named Country. Under Country group create single term set named India. Under India there will be multiple terms as in the following image:

Term Store Management

Step 3:
Page Library setting changes. We need to create column with reference to manage metadata.

Go to site content - Pages, Library, then Library Settings.

Library setting

Create new column with name "country " & datatype as Managed Metadata. Under manage metadata select “India” as in the following image.
Create new column

Step 4:
Create new wiki page. Here select (Enterprise Wiki Page) Basic Page Layout.

Page name – AddCustomTerm.aspx

create page

Step 5: Edit Page using SPD 2013.

Firstly, open SharePoint Designer SPD 2013. Now open wiki site into it. Go to All Files, then Pages.

Under pages our new wiki page is located. Check out page for editing. It prompts to edit page layout as in the following image.

edit page layout

Step 6: Add Taxonomy code, The following code reference the new column which we created in step3.

Taxonomy code
  1. <SharePoint:EncodedLiteral runat="server" text="Country" EncodeMethod="HtmlEncode"/></b><br/>   
  2. <Taxonomy:TaxonomyFieldControl FieldName="Country" EmptyValueDescriptionForTargetTemplate="No Country where selected" DisableInputFieldLabel="true" runat="server"/>  
Now do page check to save all changes. Open page in browser, you will see new control added to right hand side of page as in the following image.
page rating

Step 7: Add new term to wiki page.

Finally, we are going to add custom term to the page. Click on link to edit page in browser.

After page is available for editing, select image next to country textbox. New dialog box openS which prompt to select city names as in the following image.

select city

Save page. You will see the following view on page.

 

Save page