How to display a global slideshow block in header area?
Permalink
What I'm trying to do is create a site-wide slideshow block to show images in the header which will allow me to edit the images in one place and affect all pages.
I know how to display a block like so:
One thing I've tried is to create a scapbook containing a slideshow block then I replaced this:
...with the previous code. This caused the slideshow to malfunction. With each transition , the block moved down the page.
What is a better way to accomplish this? I guess if there is a way to pass the block object to the header area object to display, it would work.
I know how to display a block like so:
$block = Block::getByName('My_Block_Name'); $block->display();
One thing I've tried is to create a scapbook containing a slideshow block then I replaced this:
$ahh = new Area('Header'); $ahh->display($c);
...with the previous code. This caused the slideshow to malfunction. With each transition , the block moved down the page.
What is a better way to accomplish this? I guess if there is a way to pass the block object to the header area object to display, it would work.
Hi!
This is just what i was finding i guess. I want to have my header slideshow in all the pages also in the new pages that each news will create (Easy news). And i was following your instructions but i dont understand why edit page-type when there's no change in there. Other thing, i dont see that "Setup on Child Pages" pop menu.
thanks!
EDIT: I did it! i got to your other post where you developed a global_area.php and reading your instructions i got it! thanks dude! really you are the best ;)!
SOLUTION:http://www.concrete5.org/community/forums/usage/a-new-approach-to-a...
This is just what i was finding i guess. I want to have my header slideshow in all the pages also in the new pages that each news will create (Easy news). And i was following your instructions but i dont understand why edit page-type when there's no change in there. Other thing, i dont see that "Setup on Child Pages" pop menu.
thanks!
EDIT: I did it! i got to your other post where you developed a global_area.php and reading your instructions i got it! thanks dude! really you are the best ;)!
SOLUTION:http://www.concrete5.org/community/forums/usage/a-new-approach-to-a...
If that's not the problem, I'm guessing it has something to do with a custom template not loading properly maybe (which I have no idea how to fix). What you might try instead is downloading the new "Global Areas" addon from the marketplace (it's free and awesome):http://www.concrete5.org/marketplace/addons/global-areas...
Then choose one page to be the "source" where you will edit the slideshow from (the home page makes sense if the header area is actually on that page) and add the Slideshow block to the Header area on that page. Then go to your Page Defaults (Dashboard -> Pages and Themes -> Page Types, click "Edit" button next to the page type you want this to be on (you may have to repeat these steps for different page types if you really want it to be on every page in the site), then add the "Global Area" block to the Header area in the Page Defaults, and choose the Header Area on the home page (or whatever page you added the "source" slideshow block to). Now click on that Global Area block you just added and choose "Setup on Child Pages" in the popup menu. Check the box next to every page except for the home page (or whatever page you added the "source" slideshow to).
Hopefully that does the trick.
-Jordan