Best way to add editable fields for each page in the pages module.
  • toymachiner62toymachiner62 February 19
    I'm trying to add some custom fields for a bunch of pages of my site. Currently they are all using the same layout, and I have this code in MY_fuel_layouts.


    // commonLaoyut layout fields
    $config['layout_fields']['commonLayout'] = array(
    'copy' => array('copy' => lang('layout_field_main_copy')),
    'page_title' => array('label' => lang('layout_field_page_title')),
    'meta_description' => array('label' => lang('layout_field_meta_description')),
    'meta_keywords' => array('label' => lang('layout_field_meta_keywords')),
    'body' => array('label' => lang('layout_field_body'), 'type' => 'textarea', 'description' => lang('layout_field_body_description')),
    );


    Then to allow inline editing, i'm adding this code in my view

    <?php echo fuel_var('page_title'); ?>


    How can I make custom fields for each page? Do I have to give them all their own layout and specify as i'm doing or is there a better way to do it?
  • toymachiner62toymachiner62 February 19
    I found this http://www.getfuelcms.com/forums/discussion/215/multiple-inline-edit-areas-with-one-layout/p1 and it seems like the layouts are the only way to do it.
  • adminadmin February 20
    That is correct. The layouts determine which variables are allowed on a page.

Howdy, Stranger!

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

Sign In Apply for Membership

Categories