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
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
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:
you should output field values in field_out_value.tplCode:Only registered members can view the code.
Last edited by Rudi; April 6, 2018 at 04:24 AM.
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
Go to includes > classes > rlCommon.class.php > adaptValue() > see case 'mixed':
That's the function that I was looking for. Thank you Rudi!