All I wanted to know of MMS 2013- 2

9/23/2012

In the second part we discuss the new features available and some interaction with the Custom Property bag introduced in the terms.See Part one here...

MMS application

  • Term Group

Click on Term Group and on the right pane, there is one more entry “Unique Identifier” at the bottom.
No point in guessing, this is the guid for the group.  This is not limited to Group but extends to all
Terms, Termsets. This is actually helpful in case you want to write that nifty Console application to ‘fix’
some thing in MMS.  You can use this id to load the groups, terms etc.


  • Term Set / Term - functionality

Terms can now be pinned into different Term Sets. Basically, we can create a ‘Read Only’ copy of any existing term from a different Term Set into the parent term. The copy will behave like any other child term of the term set except that it would be read only.  IE you can’t modify the Label, description, default label, custom properties,Refinement Panel etc of the term if you are accessing it from the destination term set. But other properties like navigation etc can be modified from destination term set.
Particularly useful when you have a subset of terms repeating itself, eg company profile being repeated into About us and Home Page of the company’s web site
As you can see the terms with orange dot is actually a term in the term set two but is being shown as a child of Term One.



Pinning can be done by click on the Term Set and selecting ‘Pin Term with Children’



 
  • Term Set  Configuration

The number of configuration panes for Term Set / Terms have been increased to handle the navigation and search
configuration associated with them.


If you do not see all the tabs in your environment, then select the following options in the ‘Intended’ tab of the Term Set / Term node


Term Driven Pages

  • Target Page Setting

In this page you specify the url to which the click of term in the navigation should take a user to. The page url mentioned here is inherited by the child terms but can be overridden.

  • Catalog Item Page settings 

Shall cover this point in the future e-catalog blog in details. Meanwhile check this and this blog for catalog support in 2013
  • Custom Properties

This is terms property bag, which stored only string as values. Any additional metadata about the term can be stored in this bag for e.g., if you have a product Term and want to store the department product associated with it, then Custom Properties is the place to store it.
Here is a sample code to ‘access’ the custom properties in C#. You can also be created via the custom property via UI.

//c# code

// replace the url in spsite with your own

            using (SPSite site = new SPSite("http://ako-dev1:37937/sites/RnD/" ))

            {

                using (SPWeb web = site.OpenWeb())

                {

                    TaxonomySession taxonomySession = new TaxonomySession(site, updateCache: true);

 

                    TermStore termStore = taxonomySession.TermStores[0];

                    // replace the term set id as per your environment

                    TermSet termSet = termStore.GetTermSet(new Guid("edcef7f6-0a7e-4d32-92ae-eff85ce912c0"));

                    // replace the term id as per your environment

                    Term term = termSet.GetTerm(new Guid("8bdb0717-f8e5-482e-82d3-35eba168f647"));

                    term.SetCustomProperty("TermProperty", "Term Property set programatically");

                    termStore.CommitAll();

                    string custValue = term.CustomProperties["TermProperty"];

                    Console.WriteLine(custValue);

                    Console.ReadLine();

                }

            }



Key Points Regarding Custom Properties...

  • Difference between Local Properties and Custom Properties being the former are inaccessible in case you try to access them via destination Term Set.
  • Custom Properties are Read Only in the destination Term Set.
  • At the time of writing this blog Custom Properties are not inherited. Ie custom property created in a parent term is not automatically inherited in the child. I can’t think of any reason why it should not…but maybe I am missing something (any help?)

In next post, I shall do a demo of the the Translation and Navigational aspect of Managed Metadata. Watch this space for more...

Name

Email

WebSite