Display custom files value (select list) from LANG file

Hello

I have this custom file - select list:

-Please select;FOR_Android;FOR_Windows;FOR_Mac;FOR_iPhone;FOR_PWA;FOR_WebApp

And under en-GB.com_djclassifieds.ini - I have this:

COM_DJCLASSIFIEDS_FOR_ANDROID="Android"
COM_DJCLASSIFIEDS_FOR_WINDOWS="Windows"
COM_DJCLASSIFIEDS_FOR_MAC="Mac"
COM_DJCLASSIFIEDS_FOR_IPHONE="iPhone"
COM_DJCLASSIFIEDS_FOR_PWA="PWA"
COM_DJCLASSIFIEDS_FOR_WEBAPP="Web App"


The file show the CORRECT values, under default "customdetails"

<?php
if(count($this->fields)>0){?>

<?php echo $this->loadTemplate('customdetails'); ?>

<?php } ?>


But I want to use this file in others places in my ITEM template, - I use this code

<?php
//125 App for
if(!empty($this->fields['125']->value)){
echo "";
echo $this->fields['125']->value; }
?>

This code, show the value from the "File" but I need to show the value from the LANGUAGE -

Need to show this value: Android

But now show: FOR_Android












Tagged:

Comments

  • Hello,

    It looks like the line:
    echo $this->fields['125']->value;

    needs to be replaced with:
    echo JText::_('COM_DJCLASSIFIEDS_'.strtoupper($this->fields['125']->value));

    Cheers
  • Hello,

    It looks like the line:
    echo $this->fields['125']->value;

    needs to be replaced with:
    echo JText::_('COM_DJCLASSIFIEDS_'.strtoupper($this->fields['125']->value));

    Cheers

    Many thanks, this is OK for simple text values.

    Is posibol to get the same for an more COMPLEX values???

    EXAMPLE:

    LABEL: Language
    TYPE. checkbox
    VALUES:
    LANG-Multi-Language;LANG-Afrikaans;LANG-Amharic;LANG-Arabic;LANG-Armenian;LANG-Bulgarian;LANG-Byelorussian;LANG-Catala;LANG-Chinese;LANG-Croatian; ......

    OVERRIDES:
    COM_DJCLASSIFIEDS_LANG-MULTI-LANGUAGE
    & nbsp ; & nbsp ; & nbsp ; < img src = " https://mysite.com/images/flag/multi.png" title="'Multiples Idiomas" alt="'Multiples Idiomas" /> Multiples Idiomas
    es-ES
    Site

    COM_DJCLASSIFIEDS_LANG-CHINESE
    & nbsp ; & nbsp ; & nbsp ; < img src = " https://mysite.com/images/flag/chinese.png" title="Chino" alt="Chino" /> Chino
    es-ES
    Site

    -------and more-----I have separed on this post the "img" and "space" html tags----------

    Using this code:
    //108 LANGUAGE
    if(!empty($this->fields['108']->value)){
    echo "";
    echo JText::_('COM_DJCLASSIFIEDS_'.strtoupper($this->fields['108']->value)); }

    The rezult is:
    COM_DJCLASSIFIEDS_;LANG-MULTI-LANGUAGE;LANG-CHINESE;LANG-CZECH;LANG-SPANISH;

    And need to look like this:
    Multiples Idiomas Multiples Idiomas,    Chino Chino

    Many thanks
  • Hi. If you have DJ-Classifieds active subscription, please contact us on helpdesk. Regards
Sign In or Register to comment.