Is it possible to insert tags via the API? I'm able to insert the tags in the property, but how do I insert the tags in de table cmsTags? I can't find any function to accomplish this.
The Doctype uses the Umbraco tags control, with autocomplete. Viewing the Umbraco.config, I can see the values inserted perfectly, but the checkboxlist field in the autocomplete is empty because there are records inserted into the cmsTags table.
I am using Umbraco 4.7 and I am trying to insert tags using
int id = umbraco.cms.businesslogic.Tags.AddTag("xxx","default")
As stated you must check if the tag exists first. However I have the following problem when adding more than one tags: The first time AddTag executes, it correctly add the tag and I get an id to associate with the document. But in the loop, the second time it runs, the id returned is 0, and I know the tag does not exist. I am using 4.7. Any hint to this?
Create tags with API
Is it possible to insert tags via the API? I'm able to insert the tags in the property, but how do I insert the tags in de table cmsTags? I can't find any function to accomplish this.
The Doctype uses the Umbraco tags control, with autocomplete. Viewing the Umbraco.config, I can see the values inserted perfectly, but the checkboxlist field in the autocomplete is empty because there are records inserted into the cmsTags table.
I've managed to insert tags with:
Does this function check for existing records?
Appearently not, I've to check with the GetAllTags method if the tag exists. Any other suggestions?
I am using Umbraco 4.7 and I am trying to insert tags using
As stated you must check if the tag exists first. However I have the following problem when adding more than one tags: The first time AddTag executes, it correctly add the tag and I get an id to associate with the document. But in the loop, the second time it runs, the id returned is 0, and I know the tag does not exist. I am using 4.7. Any hint to this?
Also just test GetTagId - the same happens. The second time it runs it returns 0, even if the tag exists in the database.
is working on a reply...