Coding appears as text

A vendor wants to add some html to his description - which appears fine on his storefront. However, I notice on the “All vendors” page it displays this coding as text. Any suggestions to fix this?

In this case you should show full description instead of the truncated one with the More link.

To do it

  • open the /design/themes/responsive/templates/views/companies/catalog.tpl file
  • change

show_links=true

to

show_links=false

  • save the file and clear the cache
1 Like

I recommend to create a template post hook via the My changes add-on.
design/themes/responsive/templates/addons/my_changes/hooks/companies/company_data.post.tpl

{capture name="company_descr_`$obj_id`"}
    {if $show_descr}
        {if $runtime.controller == "companies" && $runtime.mode == "catalog"}
            {if $show_links && $company.company_description|fn_strlen > 1024}{$company.company_description|strip_tags|truncate:1024 nofilter} <a href="{"companies.products?company_id=`$company.company_id`"|fn_url}">{__("more")}</a>{else}{$company.company_description nofilter}{/if}
        {else}
            {if $show_links && $company.company_description|fn_strlen > 1024} <a href="{"companies.products?company_id=`$company.company_id`"|fn_url}">{__("more")}</a>{/if}
        {/if}
    {/if}
{/capture}

You can adjust the length of the text that will be truncated, by changing the value ‘1024’.

As far as I can tell, this didn’t work. :pensive:

I do not have a my_changes folder.

Hello

You should create this folder “my_changes” in places where it is needed

Best regards
Robert

1 Like

In this case I can assume that the catalog.tpl file is overriden with 3rd party module