+ Reply to Thread
Results 1 to 6 of 6

Thread: show two fields together in listing detail page

  1. #1
    Member
    Join Date
    Jul 2016
    Location
    Iran
    Posts
    74

    show two fields together in listing detail page

    Hello,

    I want to show two fields together in listing detail page. For example, the country and city fields are as follows:
    Country / city ................................. country value / city field value
    Country field key is country and city field key is city.
    Should I edit the code of the template file and how?
    please guide me.

    Thank you
    Car sell in: BanBan.ir

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

    you should use additional code in listing_details.tpl:

    {$listing.<group_key>.Fields.<field_key>.value}

    <group_key> - a key of the field group to which your location field is related
    <field_key> - the key of your location field

    ex:

    {$listing.location.Fields.country.value} / {$listing.location.Fields.country_level1.value}

  3. #3
    Quote Originally Posted by Rudi View Post
    Hello,

    you should use additional code in listing_details.tpl:

    {$listing.<group_key>.Fields.<field_key>.value}

    <group_key> - a key of the field group to which your location field is related
    <field_key> - the key of your location field

    ex:

    {$listing.location.Fields.country.value} / {$listing.location.Fields.country_level1.value}
    So if we use this it will still show the default listing field right Rudi?
    Can we hide the default country and city?

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    You should disable these fields for details page: Listing Fields > your field > Edit > View Details page > uncheck

  5. #5
    Member
    Join Date
    Jul 2016
    Location
    Iran
    Posts
    74
    Thanks Rudi for your help,

    If disable these fields for details page, this fields not display in App. I used your code in this form:
    PHP Code:
    Only registered members can view the code
    group_key = location
    field_key = country
    field_key = country_level1

    And i used CSS for prevented the display of the default field.
    PHP Code:
    Only registered members can view the code
    Last edited by Mousa Lotfi; May 2, 2018 at 05:54 AM.
    Car sell in: BanBan.ir

  6. #6
    [QUOTE=Mousa Lotfi;22737]Thanks Rudi for your help,

    If disable these fields for details page, this fields not display in App. I used your code in this form:
    PHP Code:
    Only registered members can view the code
    group_key = location
    field_key = country
    field_key = country_level1

    And i used CSS for prevented the display of the default field.
    PHP Code:
    Only registered members can view the code
    /QUOTE]

    Nice, thank you Mousa

+ Reply to Thread