Rendering SQL types(inline edit/admin panel edit/create)

edited July 2012 in Modules
Hello David.
I need to make multi language content for the blog/news. Currently when you specify SQL type "text" or "varchar" the fuel cms inline edit/admin panel edit will render it as text area with edit tools( short cuts for some html tags ex h3,h2,img). I want to make tabs if the content is multi language.
The solution I see is to make sql column name for example :content_eng and content_da and make the backend logic to render them as tabs(by inserting some js and html) if content_(something) is detected and it is not single.
I need to find the file which is responsible for the rendering( to give a hint, when you specify the" image" column name it will render the html as "upload" input, I think I need to find this file)
Could you please give me some suggestions on how it is better to do?
Best regards, Arthur

Comments

  • edited 7:30AM
    I think the file you are looking for is the fuel/modules/fuel/models/base_module_model.php "form_fields" method. Alternatively, you can modify the fuel/modules/blog/models/blog_posts_model.php "form_fields" method which inherits from the Base_module_model class.

    As an FYI, the 1.0 branch has some features to help with multiple languages as well as creating tabs using the form_builder syntax. Most of it is centered around the pages module but may be worth checking out:
    https://github.com/daylightstudio/FUEL-CMS/tree/1.0
  • edited 7:30AM
    I think I need the file that adds html depending on the type. Probably I need the file which contains the logic of this line:
    $fields[$key]['type'] => 'file'
    I could make everything using JS, but that's very dirty way. What do you think?
  • edited 7:30AM
    The inline edit window preloaded via AJax when you click pencil icon, but I can't find the file, which is responsible for constructing it.
  • edited 7:30AM
    The field is rendered by the Form_builder class through the fuel/modules/fuel/controllers/module.php file. For inline editing, there is additional javascript that is included in the fuel/modules/fuel/assets/js/fuel/edit_mode.js file. However, in 1.0, this has been greatly simplified in that the special field logic does not also need to be included in this file (e.g. the javascript to create an asset select field).
Sign In or Register to comment.