Jump to content

Francesco Bortolussi

Members
  • Posts

    38
  • Joined

  • Last visited

Community Answers

  1. Francesco Bortolussi's post in Multiple Search in template was marked as the answer   
    Hi, maybe you could pass your variables as Array. 
    You should name your select
    <select name="tokenize[]" >
    Then when you receive it, create an "OR" type of condition for the selector, using a foreach to iterates over it, or maybe a function.
    $customOrSelector = implode("|", $_GET['tokenize']); And finally, apply it to your query:
    $children = $pages->find("template=property, Ad_Type=".$ptype." ,Area=".$customOrSelector);  
    Hope this help.
     
    NOTE: Don't use this example in a production environment, is not safe to use variables directly from $_GET or any other user input without sanitize them.
  2. Francesco Bortolussi's post in Problem adding/populating repeater using API was marked as the answer   
    Guys I've got it.
    One of the steps I did before starting the creation of pages was delete them.

    Apparently:
    $delete = wire('pages')->delete($element); Differ's from:
    $delete = wire('pages')->trash($element); When I deleted the repeater's didn't get filled, but when I trash the element's they did correctly.
    Possible Bug?
    Why is this happenin'g?
×
×
  • Create New...