+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Is there a way to import categories and tags?

Is there a way to import categories and tags?

4 posts, 1 answered
  1. Elizabeth
    Elizabeth avatar
    83 posts
    Registered:
    23 Mar 2005
    30 Nov 2012
    Link to this post
    Is there a way to import categories and tags? We want to be able to categorize or tag items by local chapter names and that is a list of over 500 names. Is there a way to bulk add to the list of categories and tags in Sitefinity?
  2. Arno
    Arno avatar
    249 posts
    Registered:
    08 Sep 2010
    30 Nov 2012 in reply to Elizabeth
    Link to this post
    You can do it programmatically I think:
    http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/taxonomies/hierarchical-taxonomies/hierarchical-taxonomy-api
    Answered
  3. Elizabeth
    Elizabeth avatar
    83 posts
    Registered:
    23 Mar 2005
    04 Dec 2012
    Link to this post
    Thanks, I think I've figured out the syntax for adding to an existing category, except for synonyms. I haven't been able to figure out the correct syntax for including a synonym with the new item, is there an example of that somewhere? I haven't found it in the API documentation.
  4. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    21 Nov 2016
    03 Feb 2014
    Link to this post
    Hi,

    Find a sample of adding a taxon synonym to a tag below:

    TaxonomyManager manager = TaxonomyManager.GetManager();
    var taxa = manager.GetTaxa<FlatTaxon>().Where(t => t.Name == "Test").Single();
    Guid newGuid = Guid.NewGuid();
    var synonym = manager.CreateSynonym(newGuid);
    synonym.Value = "Test123";
    synonym.Parent = taxa;
     
    manager.SaveChanges();

    We will update our documentation and will add this new sample soon.

    Regards,
    Stefani Tacheva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
4 posts, 1 answered