API for Tags, importing Two Word Tags

David Pearson asked on March 10, 2015 21:45

When every I import a news article with a two word tag like "Spot Light". Spot Light is inserted as Spot and Light.

When every you look at the document Meta Data it is displays "Spot Light" for a tag.

My Import Line: newNode.DocumentTags = importArticle.Tags;
importArticle.Tags is a comma delimited string list. (Spot Light, Antique Walk, Hardwood Floors)

The Import works correctly, but the CMS_Tag table does not show a record for "Spot Light", "Hardwood Floors" or "Antique Walk".

This also breaks my Tag query: http://localhost:1469/design-ideas/tag/spot-light spot-light does not exist, but spot does.

Does Kentico support more than one word in a tag? If so do I need something special for the space when importing?

Correct Answer

Brenden Kehren answered on March 11, 2015 00:54

Yes, any tags with spaces, need to be wrapped in double quotes, otherwise it sees them as individual tags.

0 votesVote for this answer Unmark Correct answer

Recent Answers

David Pearson answered on March 10, 2015 23:39

I went back and look at the example API. Looking at line 231: root.DocumentTags I need to wrap my string in "" quotes. Will test that out Wed.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.