Sunday, December 15, 2013

$this -> render() not using correct view

Collection controller, want to use the same view file (display_collection) to display the multiple types of collections. Very basic, no plugins involved. Pretty much like straight out of the book.

Problem is that the default view for the action is being rendered. 

public function CollectionOne() {

$this -> render = ('/Collection/display_collection');

}


Does not use display_collection.ctp, it uses collection_one.ctp (more specifically, it complains about collection_one.ctp missing)

Is there a little trick to render()?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: