3093 Posts in 875 Topics by 654 members
| Go to End | ||
| Author | Topic: | 1736 Views |
-
Re: Show search parameters in Results Page (CustomSearchContext)

8 September 2010 at 8:15am Last edited: 8 September 2010 8:15am
Ah, my bad:
new TextField('PrixMin', 'Prix Min', $PrixMin),
new TextField('PrixMax', 'Prix Max', $PrixMax)If you want to create the vars in a template, you will need to create a method in your page to return the postVars.
something like:
function PrixMinPostVar(){
if(isset($this->request)){
return $this->request->postVar('PrixMin');
}
} -
Re: Show search parameters in Results Page (CustomSearchContext)

8 September 2010 at 8:17pm
1. Should I put this in BienImmo.php (DataObject) or in ListeBiens.php (Page where I show BienImmos) ?
2. After that, will I access the variable like this ?
<% control PrixMinPostVar %>
$PrixMin
<% end_control %>3. Can I add more variables in the function, like this :
function PrixMinPostVar(){
if(isset($this->request)){
return $this->request->postVar('PrixMin');
}
if(isset($this->request)){
return $this->request->postVar('PrixMax');
}
if(isset($this->request)){
return $this->request->postVar('Loc_Ville');
}
}
and get them in the template after that ?4. In the Loc_Ville case, does it return an array ? How do I handle it in the template ?
I know, I have a lot of questions
but "One knowing is better than Ten searching" !
| 1736 Views | ||
| Go to Top |


