Posted 12 June 2013 - 10:51 AM
So I cannot simply do 'table'=>'menu_adjacency', because that could give access to all records in the table.
Can MTreeView do something like this:
'data'=>menu_adjacency::model()->getTreeItems(), which will allow me to filter the records?
Posted 14 September 2013 - 04:35 AM
But I have one question: how can I pass usual GET parameters to controllers in 'url'?
I used to use
and then parsed it in controller to render necessary view (i.e. of "News" model)
I did it because this code didn't work:
- MTreeView tries to attach "News" filed in select statement (which doesn't exist) so I have Exception.
My first workaround worked fine until I turned on Urls PATH format ))
So I had to create 3 almost identical controllers to workaround it, like:
What's the right way to pass one more GET parametr in 'url' of MTreeView?
Thanx in advance!
Posted 25 September 2013 - 01:34 AM
There is a problem in this code:
I have a table organized in a 'Nested Sets Model' context.
In order to turn this linear table into a multidimensional array, this extension creates a SQL-statment which uses the 'COUNT' and 'GROUP BY' directives and the 'text' field to get the 'depth' value of every node.
There is no problem and works very well as long as every node has a different 'text' field (-> unique).
If two nodes share the same 'text', the resulting multidimensional array gets messed up because 'depth' is calculated wrong.
The solution for me was to replace the 'text' field in 'COUNT' and 'GROUP BY' directives with the 'id' field (which is the primary key) and now everything works fine.
Posted 30 April 2014 - 06:13 AM