Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Changing the script to be generated at scaffolding
  • Hi I'm testing out FuelPHP, coming from Kohana. I'd like to say, you guys has done and is doing a great job! I have a question regarding scaffolding. The background is, I'm using Twitter Bootstrap as my css framework. And for those of you who knows Bootstrap, it has a specific way of handling form layouts. My question is, is there a way to alter what is being generated at the scaffolding level. I'm thinking, it'll be so cool if the form to be generated is already based on how Bootstrap would layout the form. Thanks -Arnold
  • Arnold Gamboa wrote on Sunday 27th of November 2011:
    ...
    I have a question regarding scaffolding. The background is, I'm using Twitter Bootstrap as my css framework. And for those of you who knows Bootstrap, it has a specific way of handling form layouts.
    My question is, is there a way to alter what is being generated at the scaffolding level. I'm thinking, it'll be so cool if the form to be generated is already based on how Bootstrap would layout the form. Thanks -Arnold

    I think you can do it modifying these templates: \fuel\packages\oil\views\
  • You can copy them to your app/views folder (same name and folder structure), and modify them there. Do not modify anything in packages, they will be overwritten when you update the package. Note that if you do this, you will have to manually keep up with the changes made in oil generation.
  • No there isn't the Scaffolding is meant to just lay the ground work for you. Its such a great time saver just in that. One command to generate your controller, model, view and create your table & fields. But it is very easy to modify a input field to add a class to it. IE
    echo Form::input('name', 'value', array('class' => 'myclass'));
    

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion