Message of the day:
Design: https://projects.invisionapp.com/dsm/silver-stripe/silver-stripe/folder/components/5b42ca0dc1ba8c001a91b69b Background: https://docs.google.com/document/d/1hffZFknysYi6tp55eOk4DzON4pjoEt7Xq4GGD-ZGah0/edit
Discuss the future of content editing in SilverStripe via content blocks
Ah I've just spotted an issue: https://github.com/silverstripe/silverstripe-versioned-admin/issues/144
I'm currently experiencing Elemental blocks being displaying in multiple tabs (Blocks, Other).
My expectation would be that this would behave the same as pages since there is a tab defined explicitly for it. I've attached a screenshot of both views to show what I'm seeing.
Currently installed version of silverstripe-versioned-admin is 1.3.0.
If I can help with providing any more info please let me know.
Please raise an issue on elemental (if there's not one already).
@ethanj Yep, seeing the same issue.
> Block setup
> It is possible to share blocks between pages, but this may be a little bit tricky when it comes to content editing. Block should represent a chunk of page content, so editing it should not effect other pages. This depends on the project, but in most cases the content authors will be working per page (top down), so sharing blocks is probably something to avoid. Shared blocks become even less useful when large number of block instances are present as it becomes almost impossible to find the right one.
> The overall recommendation is to only allow a content block to be used on only one page. The main benefit of using blocks is to reuse patterns and functionality across pages, not necessarily content data. It's possible to add functionality which allows content authors to copy specific blocks to other pages for a quick transfer of content data.
Does anyone have an example on how to implement this feature/functionality? (Would be highly appreciated 🙂)
Not sure whether this is an elemental issue or a versioned admin issue yet. But on ss4.5 in the Archive admin I've got archived Blocks displaying in both the blocks tab and the other tab. Does anyone else experience this?
I think I’d (wrongly) presumed that would give me the Element controller.
Perfect! Thanks for your time Tim, works a treat.
return (Controller::has_curr()) ? Controller::curr() : null;
Thanks, a bit confused how to get the current page controller in that context. Tried
return ContentController::class; and
return $page->Controller; . Am I close? 🙂
The bottom of that issue is a workaround. Add an extension to the base element with a method that returns the current page controller