+ Reply to Thread
Results 1 to 5 of 5

Thread: mixed Listing filelds

  1. #1

    mixed Listing filelds

    Hi,
    I want to make a small customisation on how mixed listing fields are displayed when viewing a listing.
    Does anyone know which php file I should edit? I had a look but I cannot find the file/line that I need to change.

    Many thanks,
    Chris

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,160
    Hello Chris,

    What exactly you need to do with mixed listing fields?

    you can find a code which outputs all listings fields in: templates > your template > tpl > blocks > field_out.tpl

    here you can add a condition that would catch mixed type fields like:

    Code:
    Only registered members can view the code.
    you should output field values in field_out_value.tpl
    Last edited by Rudi; April 6, 2018 at 04:24 AM.

  3. #3
    Thank you Rudi.

    The change I need to make is in the PHP code I think.
    For mixed fields the PHP code passes into the template a string with the field value & unit combined i.e. "100 per month"
    The change I want to make is: for a specific mixed field do not include the unit in the string passed into the field_out template.
    (I created this field as mixed because I would like the units stored in the database, but not displayed when viewing a listing).

    Many thanks,
    Chris

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,160
    Go to includes > classes > rlCommon.class.php > adaptValue() > see case 'mixed':

  5. #5
    That's the function that I was looking for. Thank you Rudi!

+ Reply to Thread