I am migrating my old project to DXA 1.4. I am using Keyword fields in Schemas. While binding with default Tag Schema I am getting Keyword description instead of Keyword title. Reason for this is KeywordMap function with line
string displayText = String.IsNullOrEmpty(keyword.Description) ? keyword.Title : keyword.Description;
My question is what is the best way to get this behavior changed while binding a Model keeping in mind that it should always to ready to migrate to latest version? I can think of 2 way to do this:
- Create your own Tag and ModelBuilder class, register it to
modelBuilderPipelineand override the functions required.
- Create your own Schema for Keyword field and create your own
ModelBuilderclass and add it also to
modelBuilderPipelineto bind the model field.
Personally, I favor option 1. Please suggest, if anyone have faced similar issue. Thanks in advance.