0

I am using Sitecore 10.2 and also using Sitecore Cortex Content Tagging. I have different tag which is being created in Sitecore. I want to tag content that is available in tags only, I don't want to create new tags. I did not find any document related to this. Could you please help?

1 Answer 1

1

There is no out-of-the-box setting that will allow to disable creation of new tags.

However, you can create a custom taxonomy provider for Sitecore Content Tagging and implement your own logic in the CreateTags method or simply override the method CreateTag of DefaultTaxonomyProvider:

public class CustomTaxonomyProvider : DefaultTaxonomyProvider
{ 
    protected override ID CreateTag(TagData data)
    {
        //your logic for creating or skipping a tag
        return tagId;
    }
}

Then your custom taxonomy provider can be registered in the config to be used in Content Tagging functionality:

<contentTagging>
    <providers>
        <taxonomy>
            <add name="CustomTaxonomyProvider" type="Namespace.CustomTaxonomyProvider, AssemblyName" />
        </taxonomy>
    </providers>
</contentTagging>

Sitecore documentation for custom Content Tagging providers can be found here.

1
  • Thanks, Anna for your response. I understand that I can restrict the tag to not be created in Sitecore but I want to get only the taxonomy that is available in Sitecore. Currently, in IDiscoveryProvider, the cortex will return some taxonomy that may be not in my Sitecore. Suppose I have taxonomy A, B, C in Sitecore and Cortex is returning D, E then in this case it will not be useful for me. I want to pass A,B, C to Cortex, and Cortex can return relevant taxonomy may be B,C yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.