Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Translating categories and {exp:channel:category_archive}

Status Resolved
Add-on / Version Publisher 2.10.7
Severity
EE Version 4.3.6

Aaron Jay

Feb 07, 2019

Hi,

Does Publisher work inside {exp:channel:category_archive} ?

I’ve got the following code:

{exp:channel:category_archive channel="publications" style="linear" show="not 44"}
  {categories}
    {exp:channel:entries channel="publications" category="{category_id}” disable=“categories|member_data|pagination” dynamic=“no” limit=“2”}

{exp:publisher:translate_category cat_id="{category_id}”}{cat_name}{/exp:publisher:translate_category}

{/exp:channel:entries}
  {/categories}
  {/exp:channel:category_archive}

But it will only put out the translated category in the default language, switching languages does not put out the translated category.

I’ve tried moving it to an embed, but the following will only put out the tag {cat_name}

{exp:channel:category_archive channel="publications" style="linear" show="not 44"}
  {categories}
    {exp:channel:entries channel="publications" category="{category_id}” disable=“categories|member_data|pagination” dynamic=“no” limit=“2”}

{embed="_components/translated"}

{/exp:channel:entries}
  {/categories}
  {/exp:channel:category_archive}

Embed:

{exp:publisher:translate_category cat_id="{category_id}”}{cat_name}{/exp:publisher:translate_category}

#1

BoldMinded (Brian)

Aaron, try adding var_prefix=”something:” to the translate_category tag, then change {cat_name} to {something:cat_name}

#2

Aaron Jay

Hi Bian,

That looks like it’s fixed it, thanks a million

Login to reply