Edit Blocks Layout

edited July 2015 in Modules
Hi

Using fuellink, I can include PDFs in the dropdown list by editing MY_fuel_layouts and adding a 'data' element
'body' => array('data'=>array('link_pdfs'=>'true'),'label' => lang('layout_field_body'), 'type' => 'textarea', 'description' => lang('layout_field_body_description')),

I can do similar for the wysiwygs in my own modules:
function form_fields($values = array()) { $fields['myfield']['data'] = array('link_pdfs'=>'true'); ... }

How can I do the same for the Blocks module?

Cheers

Comments

  • edited 6:30PM
    Not quite sure I understand. The blocks would need to have a layout that includes a field which uses the wysiwyg (or a text field).
  • edited 6:30PM
    In Fuel back-end, under Site, there's a "Blocks" option. Create a new block and you get a form that includes a wysiwyg field. If I create a link within that field (using the RTE, I'm using CKEditor), in the select dropdown, I want to see the PDFs available to link to.

    My question is where is the layout data for that Blocks form? MY_fuel_layouts.php has the Pages form layout by default but I can't seem to find where the layout definition is for this Blocks form...
  • edited 6:30PM
    Hi!
    maybe you are looking for modules/fuel/models/fuel_blocks_model.php, "form_fields" method that is responsible for the form layout....
  • edited 6:30PM
    That is correct, it is in the fuel_blocks_model. You can use a module_overwrite to swap out the model with your extended fuel_blocks_model:
    http://docs.getfuelcms.com/modules/simple#overwrites
  • Thanks. I was hoping I wouldn't need to do that.

    Might it be a good idea to expose all the "standard" modules' layouts to MY_fuel_layouts.php in the future?
Sign In or Register to comment.