Block gets disconnected from Page Type Defaults
Permalink
Hey people,
I've set up some blocks via page type defaults, but when I edit one on an actual page, it gets disconnected. Although I understand why, I was wondering if I could somehow prevent this.
I want to use a block as a proxy to edit some values (page attributes), therefore creating a new instance of the block each time it's being edited, is not necessary, and even unwanted because from then on I'm not able to delete or modify blocks via page types.
I tried reading some library files (block_controller.php, block_view.php) and some models (block_types.php, block.php, collection_version.php, collection.php, page.php) but got lost :|
Any ideas to prevent a block from being disconnected?
Maybe I can go back one version if the block is being saved and the current page is not a page type? Or it's possible to reassign a block to the original page type block?
Hopefully someone understands what I'm trying to do!
I've set up some blocks via page type defaults, but when I edit one on an actual page, it gets disconnected. Although I understand why, I was wondering if I could somehow prevent this.
I want to use a block as a proxy to edit some values (page attributes), therefore creating a new instance of the block each time it's being edited, is not necessary, and even unwanted because from then on I'm not able to delete or modify blocks via page types.
I tried reading some library files (block_controller.php, block_view.php) and some models (block_types.php, block.php, collection_version.php, collection.php, page.php) but got lost :|
Any ideas to prevent a block from being disconnected?
Maybe I can go back one version if the block is being saved and the current page is not a page type? Or it's possible to reassign a block to the original page type block?
Hopefully someone understands what I'm trying to do!
Even if you overcome the 'single block' issue, I think you are going to have problems following on from this because a 'single block' needs to have some context when edited, and that context will not be the page it is showing on.
You could probably better spend your time going back to the requirement that led you to this in the first place and looking for a different way of doing it.