It looks like you're new here. If you want to get involved, click one of these buttons!
After the above code, I am able to save the block variables in the admin panel at the page level, but I am not able to see the block code being rendered.
$config['layouts']['my_layout'] = array(
'fields' => array(
'Header' => array('type' => 'fieldset', 'label' => 'Header', 'class' => 'tab'),
'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('type' => 'fieldset', 'label' => 'Body', 'class' => 'tab'),
'heading' => array('label' => lang('layout_field_heading')),
'page_active_top_menu' => array('type' => 'textarea','label' => lang('layout_field_page_active_top_menu')),
//the below section is not rendered in the front-end
'section_1' => array('type' => 'block', 'folder' => 'menu_folder'),
'breadcrumbs' => array('label' => lang('layout_field_breadcrumbs')),
'page_title_header' => array('label' => lang('layout_field_page_title_header')),
'section_2_1' => array('type' => 'textarea','label' => lang('layout_field_section_2_1')),
'section_2_2_class' => array('label' => lang('layout_field_section_2_2_class')),
'section_2_2' => array('type' => 'textarea','label' => lang('layout_field_section_2_2')),
'section_2_3' => array('type' => 'textarea','label' => lang('layout_field_section_2_3')),
'section_3' => array('type' => 'textarea','label' => lang('layout_field_section_3')),
'body' => array('label' => lang('layout_field_body'), 'type' => 'textarea', 'description' => lang('layout_field_body_description')),
'body_class' => array('label' => lang('layout_field_body_class')),
)
);
//here is the block field description
$config['blocks']['menu_block'] = array(
'fields' => array(
'page_active_top_menu' => array('type' => 'textarea','label' => lang('layout_field_page_active_top_menu')),
'sub_menu_container_class' => array('type' => 'textarea','label' => lang('layout_field_page_active_sub_menu_class')),
'background_image' => array('type' => 'file','label' => lang('layout_field_backgroundbanner')),
'background_banner_url' => array('type' => 'text','label' => lang('layout_field_background_banner_mob_url')),
'backgroundmob_image' => array('type' => 'file','label' => lang('layout_field_backgroundmobbanner')),
'background_banner_mob_url' => array('type' => 'text','label' => lang('layout_field_background_bannermob')),
'active_menu' => array('type' => 'textarea','label' => lang('layout_field_page_active_sub_menu')),
'banner_text_content' => array('type' => 'textarea','label' => lang('layout_field_page_banner_text_content'))
)
);
Comments
<?=$menu_block['page_active_top_menu']?>
Does your layout / view file have that variable passed to it?
I am using the admin panel for passing data, the only code that I am using is the above my_fuel_layout.php code shared.
So you suggest that for accessing the variable values inside the blocks HTML code, I have to use the variable as right?