Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
taxonomy-3.1.0
-
None
Description
I have a taxonomy with localized category names for English. For example:
/content/taxonomies/exampletaxonomy/exampletaxonomy + clothing + shirts + long-sleeved-shirts + hippotaxonomy:categoryinfos + en - hippotaxonomy:name = Long-Sleeved Shirts
In my HST component, I make the org.onehippo.taxonomy.api.Taxonomy object available as request attribute "taxonomy".
TaxonomyManager taxonomyManager = HstServices.getComponentManager() .getComponent(TaxonomyManager.class.getName()); Taxonomy taxonomy = taxonomyManager.getTaxonomies().getTaxonomy("exampletaxonomy"); request.setAttribute("taxonomy", taxonomy);
In my Freemarker template, I have:
<ul> <#list document.keys as key> <li> <#list taxonomy.getCategoryByKey(key).ancestors as ancestor> $\{ancestor.getInfo(hstRequest.locale.language).name\} > </#list> $\{taxonomy.getCategoryByKey(key).getInfo(hstRequest.locale.language).name\} </li> </#list> </ul>
However, instead of the localized names, the keys are printed. It turns out I'm getting a TransientCategoryInfoImpl object.