Hello everyone, I state that I do not program in php since college and I'm very rusty on the subject.
I recently discovered grocery because I was looking for a MFC framework that was quick to implement, and I must say that I am very well.
One of my biggest problems is not being able to easily implement the views to get the custom forms.
I have read that about the most popular suggestion is to wrap the output in a div and then edit it via javascript. For me that's not enough (and I don't like javascript too).
My idea is to create on the fly the pages of alternatives to the default view template that i need and utilize them by specifying their names it in the controller,
To do so I edited application/libraries/Gorcery_CRUD.php in this way:
line 4434. public function render($addLayout = null) prev was: public function render()
line 4482. $this->showAddForm($addLayout); prev was: $this->showAddForm();
line 1802. protected function showAddForm($layout = null) prev was: protected function showAddForm()
line 1819. if($layout == null) $this->_theme_view('add.php',$data); else $this->_theme_view($layout, $data); prev was: _theme_view('add.php',$data);
in this way I can redirect the wiev form 'add.php' to 'whatever.php' (obviously in the theme_view dir) simply in this way:
$output = $crud->render('whatever.php');
Well... this is not so elegant, and btw I do not like to edit libraries.
I think it would be better just to override the metods that I've edited.
Sorry for the long post, it was just to share and to say hello!
:)