Adding a field to the main layout (v1)

edited October 2013 in Share
Hi,

I added a field to "main" in MY_Fuel_layouts called "sub_content". So in the config for main, in the fields array I have:
'Sub_content' => array('label' => 'Sub content', 'type' => 'textarea', 'class' => 'no_editor', 'order' => 9)

This appears fine in the admin, and raw html data is saved in the fuel_page_variables table.

In my main.php layout view file, I have:

<?php echo fuel_var('sub_content', '<!-- No sub content -->'); ?>

This places the inline edit span, but does not render the data in the field. What am I doing wrong?!

Comments

  • edited October 2013
    GAH! The variable is case sensitive! Should have been
    <?php echo fuel_var('Sub_content'); ?>
    or alternatively rename the variable!

    I was being thicker than a whale omelette!

    Incidentally, do the docs have a comprehensive breakdown of the parameters available for the layout fields? Or are they just the same as those for Form Builder?
  • edited 11:21PM
    They are the same as what's used for Form_builder.
Sign In or Register to comment.