php - How to order the links of different pages in cakephp -
i trying figure out how links should composed in order useful. in cakephp make new pages , links each other . soemthing.com/places/catergory want appear places/category/{name of place}/{id of service type}
so in controller in cake php wrote
public function category($city){ $data = array('place' => $city); $this -> set('services',$this -> service -> find('all', array('conditions' => array('service.place' => $city)))); $this -> set($data); }
but not working, has idea this, need , new cake php pretend answering beginner.
something this
public function category($city=null,$type=null){ $conditions = array('service.place' => $city,'service.type' => $type); $services = $this -> service -> find('all', array('conditions' => $conditions))); $this -> set(compact('services','city'); }
routes.php
router::connect('/places/category/*', array('controller'=>'services','action'=>'category'));
Comments
Post a Comment