v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD |
[eluser]RJ[/eluser]
ah man! I just downloaded gcrud and now i can't use it :-(( oh well.. let us know when you are 2.0.2 compatible. thanks for the contribution!
[eluser]tieungao[/eluser]
I try to embed this at my current project but seem have many errors. Seems that auto create the title and the data table appear immediately after this. Can u provide me one example how to embed this like : $this->load->view('template/header'); $crud->render(); $this->load->view('template/footer'); Thank so much.
[eluser]Unknown[/eluser]
when i'm using wiredesignz codeigniter modular extensions i cnat do insert,delete and update in modules is there any solution? tanks
[eluser]web-johnny[/eluser]
[quote author="deadelvis" date="1302984764"]Decided to try it out but FIY... works fine on 2.0.1 but it seems to be broken on 2.0.2 / Reactor. I am guessing due to changes in system/core/Config.php. Code: A PHP Error was encountered Haven't yet figured out where to edit to fix.[/quote] I create a new version of grocery CRUD v.1.0.1 for codeigniter 2.0.x . Actually this was a bug of codeigniter 2.0.2 (because I cannot include a config folder as module). But because we just need to do our job and keep going I create another way for the config files. The new version you will find it at google code hosting by clicking the below link grocery CRUD version 1.0.1 for codeigniter 2.0.x If you want just update your older files (from grocery CRUD v.1.0.0 to v.1.0.1) , just replace your old files with the new ones.
[eluser]web-johnny[/eluser]
[quote author="tieungao" date="1303090718"]I try to embed this at my current project but seem have many errors. Seems that auto create the title and the data table appear immediately after this. Can u provide me one example how to embed this like : $this->load->view('template/header'); $crud->render(); $this->load->view('template/footer'); Thank so much.[/quote] Please be more specific. I cannot understand what the errors are. You can add your views to the top of your project or to the bottom of the project, as you show it Code: $this->load->view('template/header'); if you want to add a template you can see how you can do it by see the documentation at the below link Installation for codeigniter There I show how you can add your custom-template (I named it custom-cms) . If you have any more issues just ask.
[eluser]tieungao[/eluser]
Let's say we have one example below : function offices() { $user = $this->ion_auth->get_user()->username; $this->grocery_crud->render(); } How i can display var $user at your custom_cms template? Thanks
[eluser]web-johnny[/eluser]
[quote author="tieungao" date="1303114833"]Let's say we have one example below : function offices() { $user = $this->ion_auth->get_user()->username; $this->grocery_crud->render(); } How i can display var $user at your custom_cms template? Thanks[/quote] You can simply do Code: function offices() Or whatever view you like (before crud or after). And it will load in the $output as I say to the documentation. Its pretty simple. I have also sections on the template. But I still don't want to make it more complicated for you. If though you really need to do it with sections , for example : section user , section menu , section footer etc. Just ask it for. Hope this helps
[eluser]tieungao[/eluser]
[quote author="web-johnny" date="1303121255"][quote author="tieungao" date="1303114833"]Let's say we have one example below : function offices() { $user = $this->ion_auth->get_user()->username; $this->grocery_crud->render(); } How i can display var $user at your custom_cms template? Thanks[/quote] You can simply do Code: function offices() Or whatever view you like (before crud or after). And it will load in the $output as I say to the documentation. Its pretty simple. I have also sections on the template. But I still don't want to make it more complicated for you. If though you really need to do it with sections , for example : section user , section menu , section footer etc. Just ask it for. Hope this helps[/quote] Thanks so much for your fast support! In fact i already have a project with header, footer and templates. Now i want to embed your CRUD to this. I've tried to do like that : in controllers/admin.php : Code: function __construct() and change your template.php at custom_cms to : Code: <div><?php at my old includes/header.php i add your required code : Code: <?php foreach($css as $file): ?> and at admin/home.php i add required code : Code: <div class="for_CURD"> but seems that this CRUD output not appear directly at div class="for_CURD" Thanks so much for helping me.
[eluser]web-johnny[/eluser]
The template controller works like this. There is a main template and then when the controller finish it collect all the views and show it to the $output. Ok now for your problem there are many things that is wrong. 1st I suggest to you to use all the crud and before or after the views for example : Code: function ketqua() The second thing is that in the template you MUST use the required code . There is no other way to add my css and javascripts into the template. So a solution for this (and you don't have to delete your header and footer) is the below code to the template.php: Code: <!DOCTYPE html> or a similar thing. and to the includes header you MUST add the required code and the includes header will look something like this... Code: <head>
[eluser]tieungao[/eluser]
Thanks so much for your support! I do like your instruction and this work! Btw, have 2 litle issues : 1. Need to change to Code: $this->load->view('application/views/includes/header',array('css' => $css, 'js' => $js)); in order this working at custom_cms/template.php. Don't know why :down: 2. When i enable some function with IonAuth at include header : Code: Hello <a href=""><?php echo $this->ion_auth->get_user()->username; ?></a> this given error : Code: A Database Error Occurred Notice that function work ok on other page not using CRUD. I think have something conflict around here. Thanks again for your help. |
Welcome Guest, Not a member yet? Register Sign In |