Same block on all pages

Permalink 1 user found helpful
Hi!
What I was trying to do is to create a footer for a site which could be edited by my client.
After footer is created on one page I want it to appear on every other.
How do I do this?

Thank you )

qstyler
 
Tony replied on at Permalink Reply
Tony
Make one in your global scrapbook, then add this code to your footer, referring to the global block by name:

$block = Block::getByName('Standard Footer');
$block->display();
qstyler replied on at Permalink Reply
qstyler
you should include such block in a default template probably...
plschneide replied on at Permalink Reply
plschneide
I have been searching for the answer to this as I am sure it is out there, but I can't find it.

I want to have a menu appear on every page, but I don't want to add it on every page when I create the page, I would just like it embedded as part of the template.

Any idea how I would do this?

Basically right now I have the superfish menu block and don't want to have add it to every page manually.
matogertel replied on at Permalink Reply
matogertel
The code is for the autonav block, you'll have to find exactly how to it with the superfish:
<?php  
                  $bt = BlockType::getByHandle('autonav');
                  $bt->controller->displayPages = 'top';
                  $bt->controller->orderBy = 'display_asc';
                  $bt->controller->displaySubPages = 'none';
                  $bt->controller->displaySubPageLevels = 'all';
                  echo $bt->render('view');
                  ?>
qstyler replied on at Permalink Reply
qstyler
Hi! You can edit your defaults in
Dashboard -> Pages and Themes -> Page Types

You'll find out what to do there by yourself.