Jump to content


how to edit view part

theme view

  • Please log in to reply
4 replies to this topic

#1 mayur.shastri143

mayur.shastri143

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 07 June 2012 - 06:56 AM

how to make changes in view file. should i shift code from theme folder to view page?

#2 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 10 June 2012 - 03:36 PM

I'm not sure I understood your question.
But if you are using flexigrid theme you will see a folder views where you have add, edit, list and list_template views.

assets\grocery_crud hemes\flexigrid\views

Hope it helps.

#3 mayur.shastri143

mayur.shastri143

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 12 June 2012 - 10:25 AM

yes but it will edit the view for every table where i used flexgrid.
but what about the MVC way?
there is no view for my ONE perticular controller.
how can i edit view for only one controller's view?
in GC we have one COMMON view for all

#4 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 13 June 2012 - 05:05 PM

You can have as many views as you wish and load them on your controller.
Regarding different flexigrid view, if you need to change much from one version to another then you would need to edit and save that version as a differente theme, then you use that theme on the cruds you wish.

Cheers

#5 kenvogt

kenvogt

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 14 June 2012 - 07:40 PM

You probably don't need to change the templates. What you need are view files that create a wrapper around the coded rendered by Grocery CRUD with ->render(). You would do something like this in your controller:


$data = $crud->render();
$this->load->view('my_view', $data);

Then you would have a view file (named 'my_view.php') like this:



<body>
<h1>My Header</h2>
<!-- What follows is the output from render()
<?php echo $output; ?>
<table>
<tr>
<td>any html I want</td>
</tr>
</table>
<p>a footer paragraph>
</body>





Also tagged with one or more of these keywords: theme, view

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users