I am working on a taxonomy-based function for a website where we have AJAX previous/next functionality to move from term to term. I'd like to dynamically repopulate the document title with the metatag title as new content is loaded. When I dump the contents of a term returned from taxonomy_term_load() in my AJAX callback, I see the metatag data. The issue is the language variable as there is no $term->language. I tried entity_metadata_wrapper('term', $term), but there is no metatag data in the array that is returned. Is using $term->metatags[LANGUAGE_NONE]['title'] my only option?

I am not using i18n right now, but may in the future, hence my reservation with hard-coding this.

Comments

cameron prince’s picture

Issue summary: View changes