Welcome Guest, Not a member yet? Register   Sign In
Template controller to grocery CRUD?
#11

[eluser]web-johnny[/eluser]
@a/\ekc This is why I'm having this poll :-) . Probably in the next version (1.1) I will remove the two libraries so the users will be more flexible as you said. The next version (probably) will work with views so this will make it automatically more flexible.
#12

[eluser]felix_[/eluser]
@web-jonny
ok this works.. so i dont have double loaded jquery but i still dont know what causes the js error :/
#13

[eluser]a/\ekc[/eluser]
Quote:a/\ekc This is why I'm having this poll :-) . Probably in the next version (1.1) I will remove the two libraries so the users will be more flexible as you said. The next version (probably) will work with views so this will make it automatically more flexible.

As for me, there was no problem put grocery CRUD dataset in my view
I did in version 1.0.3 so (experimental)

I had only MY_Loader.php (without MY_Output.php)

in controller
Code:
function test_crud_in_view(){

        $this->load->add_package_path(APPPATH.'third_party/grocery_crud/');
       // remove all output
       // $this->output->set_template('custom_cms');
        $this->load->library('grocery_CRUD');
      
        $crud = new grocery_CRUD();
        
        $crud->set_table('test_table');
        
        //remove render to avoid echo cruddataset before all view content
        //$crud->render();

        $data[$crud] = &$crud;
        $this->load->view('template',$data);

}

so in view/template.php

Code:
<?php
//template with CRUD
$this->load->view('header');  

if (isset($content)) echo $content;
//render CRUD if needed
if (isset($crud) && is_object($crud)))
$crud->render();

$this->load->view('footer');
?>

and so only one problem exists to quickly get correct CSS and JavaScript libraries for concrete theme
And i think this is your development priority ;-)
#14

[eluser]web-johnny[/eluser]
Did you read the installation instructions for to not work with templates ? Is if you scroll down a bit on http://www.grocerycrud.com/crud/view/cod...stallation . But you still need the MY_Loader.php for now this version of grocery crud.
#15

[eluser]a/\ekc[/eluser]
[quote author="web-johnny" date="1308261675"]Did you read the installation instructions for to not work with templates ? Is if you scroll down a bit on http://www.grocerycrud.com/crud/view/cod...stallation . But you still need the MY_Loader.php for now this version of grocery crud.[/quote]

I see that your main aim is completely remove MY_Output and MY_Loader.
As for me, the main problem is to have "public" or "template" folder only in top of web folder node without any other possibilities to rename or move them to another place them quickly. In my project i can use such folders for other goals already.
So i voted for template controller, but would like to see it more flexible in this.
Think, we have understood one another.
Best wishes.
#16

[eluser]lwliang061[/eluser]
These things looked pretty good,some that I can learn, and I hope to learn more on it!
#17

[eluser]ipsod[/eluser]
It's too "magic" for me as is. I use CI, not RoR, because I prefer simplicity and ease of customization.
#18

[eluser]web-johnny[/eluser]
Thanks guys I really appreciate it :-)




Theme © iAndrew 2016 - Forum software by © MyBB