PDA

View Full Version : Multilanguage Description in Listings



Andre F
December 30, 2022, 08:34 AM
Hello,

i tryed to get a short description in listing and put the follwing code in listing.tpl


{if $listing.additional_information != NULL}
<div class="table-cell small clearfix">
{$listing.additional_information|replace:'...':''| truncate:150:'..'}
</div>

With one language it works good, bit i have 2 languages activated

Now i get a {|de|} in front of description.

I am unfortunately not yet very familiar with the framework
Please could you help how to fix this?
Which Framework do you using for this?

Andre F
January 6, 2023, 05:47 PM
Hello,
if you cant answer my question, can you tell me which template are controlling the language output of additional information?

Rudi
January 6, 2023, 10:08 PM
Hello,

You need to use this variable to access formatted listing data:

{$listing.fields.FIELD_KEY.value}

your field is also should be added to the browse form of the related category

Andre F
January 8, 2023, 07:03 AM
Hello,
i tryed a cupple thingit but it is not working

{$listing.fields.additional_information.value} - nor result
{$listing.fields.additional_information.de} - nor result
{$listing.listings.additional_information.de} - nor result
{$listing.listings.additional_information.value} - nor result
{$listing.additional_information.de.value} -> just the first sign of the sentence or the curly braces if it is on the first position

Rudi
January 9, 2023, 09:27 AM
the correct case is {$listing.fields.additional_information.value}

Make sure that this field exists on the browse form of your category