tags

paul carter asked on November 5, 2019 13:36

We are wanting to perform bulk up date on page metadata tags. Is their a potential quick solution to this, maybe using api calls, macros etc. I have managed a similar exercise updating page categories by writing api calls linked to a scheduled task. Our example could be all the pages under /root/News would have a tag called News etc.

Recent Answers


David te Kloese answered on November 5, 2019 15:17

Hi,

If possible I'd use a scheduled task with some parameters (which starting path, which categorie, etc.)

You can check the documentation for API calls: docs.kentico.com/api12sp/Categories Adding pages to categories

Connecting a page to a category go's somewhat like:

// Adds the page to the category
DocumentCategoryInfoProvider.AddDocumentToCategory(page.DocumentID, category.CategoryID);
0 votesVote for this answer Mark as a Correct answer

paul carter answered on November 5, 2019 16:00

Actually my question was regarding Page Tags, but assume a similar exercise can be opposed as performed on categories. Am i also correct in assuming that all tags must be a member of a group tag ?

Regards

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on November 5, 2019 16:37 (last edited on November 5, 2019 16:46)

Tag api documentation is here

Don’t forget about group tags you probably want to do it at the same time. The way I would approach I would create some sort of reference table Where I would say “this alias path this tag” i.e.

"root/news/" "news"
"root/news/corpo"  "corporatenews"

And then iterate through this table getting documents by alias path and tagging them It is more the question how you are going to use these tags later on.

0 votesVote for this answer Mark as a Correct answer

paul carter answered on November 11, 2019 16:15

Hi Basically i have set up two smart filters and a results table, the first filter works on categories, the second filter i intend to set up a refined tag search of pages identified in specific categories. Both filters are working, i just needed to bulk update a number of pages with a number of specific tags ie Training pages, Business pages etc. The list is quite small just a large number of pages to update.

0 votesVote for this answer Mark as a Correct answer

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