2023/9/19 3:11:58
|
---|
|
Blocks that are URL awareHi, I want to add a image block to every page on a new site, along the likes of https://www.oudervereniging.be/. I would need the same layout for content, event and blog pages
My idea would be to re-write the existing billboard plugin and make the block page-aware. Is there a way to retrieve information in a block concerning the module and the page the block is shown? In that case I would handle the images ona page-by-page basis. |
_________________
|
2023/9/19 19:23:40
|
---|
|
Re: Blocks that are URL awareWhat you describe is something SimplyWiki does using 'SideContent'. The concept is to create content related to the main content and assign it as the SideContent for the main page. Then, enable the SideContent block and place it where you will. Based on the page being viewed, the SideContent block displays the content of the page specified as SideContent for the page. You can see this in effect at www.design-n-bloom.com - visit most of the pages in the menu bar and the block labeled "More Information" is the side content block. 'Send Fresh Flowers' and 'Plan Your Wedding' are the 2 main examples. |
2023/9/19 19:32:14
|
---|
|
Re: Blocks that are URL awareJust brainstorming other alternatives - use a custom block with type PHP. It might be a bit of a chore to figure out all the parameters for each module, but it could be done. Use icms::$module to determine which module it is, then specific branches to process the individual pages of that module. How you would assign content to the block based on the module + page and easily be able to change it... challenging. Custom tags could be used, too. All in all, I'd default to SimplyWiki for everything. |
2023/9/19 19:37:10
|
---|
|
Re: Blocks that are URL awareStill more - SymLinks allows you to define 'visible in' pages for any URL. For your situation, though, you'd still need a block for every page. You're going to have to deal with this for almost any option to have different content based on the URL. Once built, it should be fairly easy to maintain. Sign in, go to the page, click on Edit for the block, edit and save. |