⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set_subject() in 1.3.1 not working????



ganbca2003
  • profile picture
  • Member

Posted 10 September 2012 - 05:42 AM

Hi,

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.....

noskov.biz
  • profile picture
  • Member

Posted 10 September 2012 - 07:04 AM

Hi, ganbca2003 and welcome to the forum!
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!

ganbca2003
  • profile picture
  • Member

Posted 10 September 2012 - 07:26 AM

Hi noskov,

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??? :(

noskov.biz
  • profile picture
  • Member

Posted 10 September 2012 - 07:44 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>

ganbca2003
  • profile picture
  • Member

Posted 10 September 2012 - 08:08 AM

[quote name='noskov.biz' timestamp='1347263066' post='3338']
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...................... :D :D :D