+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Result Custom

  1. #1
    Senior Member
    Join Date
    Aug 2014
    Posts
    163

    Result Custom

    It must be late, but I can not display all the results! Only one result is taken into account.

    Code:
    Only registered members can view the code.
    Last edited by Blackred; January 14, 2018 at 02:14 AM.

  2. #2
    Senior Member
    Join Date
    Aug 2014
    Posts
    163
    What is the function that displays all options checker ? Any idea ?

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

    - On what page you need to use this code and where in the script you insert it?
    - What is the type of field 'immo_equipements_du_bien'?

  4. #4
    Senior Member
    Join Date
    Aug 2014
    Posts
    163
    Hello Rudi,

    This is on the result of a listing-details.tpl page
    I did not keep the basic function because I change a lot of things, but I must say that I block on this part.
    This is an option of an announcement in checkbox

    Exemple : https://www.zoomprovence.fr/immobili...ssanne-75.html
    > Commodit

  5. #5
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    The checkbox values are combined in one string with a comma like '1,2,3,5'

    you should divide them by comma assigning to a new value:
    Code:
    Only registered members can view the code.
    then use your new variable {$items} and iterate it to check its values like this:
    Code:
    Only registered members can view the code.
    so in your case it should look like:
    Code:
    Only registered members can view the code.

  6. #6
    Senior Member
    Join Date
    Aug 2014
    Posts
    163
    Hello Rudi,

    Thank You Very much !!!

  7. #7
    Senior Member
    Join Date
    Aug 2014
    Posts
    163
    Hello Rudi

    Code:
    Only registered members can view the code.
    I would like to do the same thing as above but with the data in the data, how do I please bring it out?

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

    The same way,

    but instead of using:

    Code:
    Only registered members can view the code.
    you should use the key of the item from Data Entiries > your entry > Build

    for example:
    Code:
    Only registered members can view the code.

  9. #9
    Senior Member
    Join Date
    Aug 2014
    Posts
    163
    Thank you Rudi,

    by any chance, isn't there a way to make a foreach only on part? I have 200 lines per field. if ever

  10. #10
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Instead of {foreach} you can use {if} condition along with in_array method like that:

    Code:
    Only registered members can view the code.

+ Reply to Thread