set_subject() in 1.3.1 not working????
- Single Page
Posted 10 September 2012 - 05:42 AM
now i'm using grocery crud 1.3.1. In here I want set title to the grid.
I used set_subject() function for this. In 1.3 its work fine, but in 1.3.1 its not work
Here is my code,
[php]function index(){
$crud=new grocery_CRUD();
$crud->set_table('users');
$crud->set_subject('User Profiles'); /* Not Working */
$output=$crud->render();
$this->_crud_view('$output');
}[/php]
Thanx.....
Posted 10 September 2012 - 07:04 AM
Please, try to use grocery CRUD in your controller with [b]any[/b] other function (for example, "user_profiles"), [b]but not with the "index"[/b] function, as grocery CRUD will not work with "index".
Best regards!
Posted 10 September 2012 - 07:26 AM
Thanx for your replay....
I change my function name also
[color=#000088]function[/color][color=#000000] profiles[/color][color=#666600](){[/color]
[color=#000000] $crud[/color][color=#666600]=[/color][color=#000088]new[/color][color=#000000] grocery_CRUD[/color][color=#666600]();[/color]
[color=#000000] $crud[/color][color=#666600]->[/color][color=#000000]set_table[/color][color=#666600]([/color][color=#008800]'users'[/color][color=#666600]);[/color]
[color=#000000] $crud[/color][color=#666600]->[/color][color=#000000]set_subject[/color][color=#666600]([/color][color=#008800]'User Profiles'[/color][color=#666600]);[/color][color=#000000] [/color][color=#880000]/* Not Working */[/color]
[color=#000000] $output[/color][color=#666600]=[/color][color=#000000]$crud[/color][color=#666600]->[/color][color=#000000]render[/color][color=#666600]();[/color]
[color=#000000] $this[/color][color=#666600]->[/color][color=#000000]_crud_view[/color][color=#666600]([/color][color=#008800]$output[/color][color=#666600]);[/color]
[color=#666600]}[/color]
But subject not display in top of grid,
What to do???
Posted 10 September 2012 - 07:44 AM
If you want to show the subject at the title, please, go to the ./assets/grocery_crud/themes/flexigrid/views/list_template.php file and change folowing code near the line #30 or so
<div class="ftitle">
</div>
to the
<div class="ftitle">
<?php echo $subject;?>
</div>
Posted 10 September 2012 - 08:08 AM
You are welcome! As I remember the subject and should not be displayed at the top of the table. It will appear with button "Add [b]User Profiles[/b]".
If you want to show the subject at the title, please, go to the ./assets/grocery_crud/themes/flexigrid/views/list_template.php file and change folowing code near the line #30 or so
<div class="ftitle">
</div>
to the
<div class="ftitle">
<?php echo $subject;?>
</div>
[/quote]
Thanx Thanx Thanx......................