Subscription Form on Every Page?
Permalink
Hey guys,
any advice as to how i go about getting the same form on to every page?
I have been trying to figure out a way how to implement a subscription form (email and name fields only) as i do when i set up the autonav block.. i.e. have the block set up inside the template already... eg.
$bt_menu = BlockType::getByHandle('autonav');
$bt_menu->controller->displayPages = 'top';
$bt_menu->controller->orderBy = 'display_asc';
$bt_menu->controller->displaySubPages = 'all';
$bt_menu->controller->displaySubPageLevels = 'custom';
$bt_menu->controller->displaySubPageLevelsNum = '1';
$bt_menu->render('templates/header_menu');
But i do not know how to set up the form using the above method. Thoughts?
any advice as to how i go about getting the same form on to every page?
I have been trying to figure out a way how to implement a subscription form (email and name fields only) as i do when i set up the autonav block.. i.e. have the block set up inside the template already... eg.
$bt_menu = BlockType::getByHandle('autonav');
$bt_menu->controller->displayPages = 'top';
$bt_menu->controller->orderBy = 'display_asc';
$bt_menu->controller->displaySubPages = 'all';
$bt_menu->controller->displaySubPageLevels = 'custom';
$bt_menu->controller->displaySubPageLevelsNum = '1';
$bt_menu->render('templates/header_menu');
But i do not know how to set up the form using the above method. Thoughts?
Seehttp://www.concrete5.org/help/editing/scrapbook_defaults/...
Thanks for the reply.
I understand you can copy custom code/block into scrapbook and therefore use defaults under page type in order for all pages to inherit this form... but in my case i have 3 templates i am using, and would prefer all 3 templates to use the one same form.
I have found that if you use the forementioned procedure, you will find in the reports tab 3 subscription panels, which i am assuming is because of the 3 templates I have inserted those forms in. It looks rather messy in my opinion and would prefer all responses to be incased in the one panel.
Also i find it a lot easier to just write the block into the template as it stops users playing with that block.
cheers,
Ritchie
I understand you can copy custom code/block into scrapbook and therefore use defaults under page type in order for all pages to inherit this form... but in my case i have 3 templates i am using, and would prefer all 3 templates to use the one same form.
I have found that if you use the forementioned procedure, you will find in the reports tab 3 subscription panels, which i am assuming is because of the 3 templates I have inserted those forms in. It looks rather messy in my opinion and would prefer all responses to be incased in the one panel.
Also i find it a lot easier to just write the block into the template as it stops users playing with that block.
cheers,
Ritchie