Be sure to checkout our newest add-on Reading Time Pro!

Compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field (it's in the works).

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)

Feb 07, 2019

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

#2

Aaron Jay

Feb 07, 2019

Hi Bian,

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

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.