Changing block options on different pages
Permalink
I've been going through the block tutorial and have created a little gallery block which works pretty well so far. What I'd like to do is have the option to display a different gallery of images on different pages. Say I have a gallery of cars, I'd display it on one page and a gallery of flowers would be on another having to do with flowers. I understand that when you add the block to a page and click on "Add" it calls the parent save function. How do you specify different options and then retrieve them again? I haven't been able to find anything through google or these forums.
Picking them from the file manager at the moment; their file id's get saved to a database and then loaded onto the page. Yes, in theory I would like to have the block load different content for each page, which I can detect the page to load the content. But where do I retrieve the option that tells me which content I'm loading for which page?
I can hard code each gallery for a specified page, but it seems like I should be able to do something more dynamic.
I can hard code each gallery for a specified page, but it seems like I should be able to do something more dynamic.
When you place a new copy of your block on each page, you should be able to pick different photos from the file manager that apply just to that specific instance of the block.
Would it be possible for you zip up your block directory and attach it here so we know what we're dealing with?
Would it be possible for you zip up your block directory and attach it here so we know what we're dealing with?
It should be designed so that each time you place your block on a page, you should be able to assign different images to the block.