Closed luisillo26 closed 11 years ago
What error are you getting? Try adding public $uses = array('Parent', 'Child')
in your controller. I don't remember how I have that setup.
Please re-open if you have questions.
I my app I have following models: Category ----(has many)---> Subcategory----(has many)--->Product and I need to show Category name on Product list, so I need an information from 2 step higher. I try:
'DataTable.DataTable' => array( 'columns' => array( 'id' => false, 'Subcategory.Category.name' => "Category", 'actions' => null), ),
But is not working
I'm trying to paginate an associated model inside of a view called view. The issue is: instead I get te JSON data, I'm getting the HTML of the view where I'm trying to render the Child data. Please help me telling me how it has to be done. Thanks in advance.
From my controller I'm calling the paginate method in the Parent controller as follows:
and in my view I render the table:
I also have the app/View/Parent/datatable/view.ctp file as this: