Add ukao menu into all pages

Permalink
i am newly to c5, i am wondering if there is way to add or include Ukao menu into every page, just like header and footer, it always show up when u add new page, i want to add Ukao menu under header section, so i think i need to modify on header.php file, i don't know how, please anyone can help.

Many thanks

 
JohntheFish replied on at Permalink Reply
JohntheFish
The simplest way to add any block (like a menu block) to all new pages is to add the block to the page defaults.

Dashboard > Pages & Themes > Page Types > Defaults

Rather than do that directly, an easier to maintain solution is to add a menu block to the global scrapbook,

Scrapbook > Global > Add Block to Scrapbook

Then insert the global scrapbook block into the page type defaults (as above), except now you can add exactly the same global scrapbook block to the defaults for all your page types.
yanyan replied on at Permalink Reply
this is my step

1, i copied the ukao menu as global scrapbook,

2, then i go to Dashboard > Page & Themes > Page Types > Default, it takes me to the frond-end page (the one i choose is full width).

3, i added ukao menu from scrapbook,

4, i added a new page, the ukao menu still not there, also everyone can edit the ukao menu.

i want the ukao menu is part of the template, like header, no one can edit.

i found some php code like

<?php

$bt_main = BlockType::getByHandle('ukao_menu');
$bt_main->controller->displayPages = 'top';
$bt_main->controller->orderBy = 'display_asc';
$bt_main->controller->displaySubPages = 'all';
$bt_main->controller->displayPagesCID = '380';
$bt_main->render('view');
?>

but the superfish style disappeared, it just not working like right ukao menu,

is anyone can help me that? thanks heaps.
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
Your point 4.
If everyone can edit it, you have a problem with permissions.
If it had not appeared, had you cleared and disabled the cache?

For coding it into the template, you are doing the right sort of thing. Be sure not to mix up block types with the actual blocks. I can't help you further with that as I have no experience of doing that for ukao menu.
yanyan replied on at Permalink Reply
thank you so much.

the way you told me is working now.

thanks
yanyan replied on at Permalink Reply
thanks for your reply.
yanyan replied on at Permalink Reply
and anyone know what's the getByHandle name for ukao menu ??

like $bt_main = BlockType::getByHandle('name or id for ukao menu ??');

many thanks