Scopey

Ah I've just spotted an issue: https://github.com/silverstripe/silverstripe-versioned-admin/issues/144

Show 1 attachment(s)
ethanjohnstone

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.

https://user-images.githubusercontent.com/23485998/72472934-7b902100-384a-11ea-98f8-7eec64f50ecc.png|image

Currently installed version of silverstripe-versioned-admin is 1.3.0.
If I can help with providing any more info please let me know.

Hide attachment content
Scopey

Please raise an issue on elemental (if there's not one already).

Conan

https://github.com/dnadesign/silverstripe-elemental/blob/4/docs/en/advanced_setup.md#user-content-block-setup > 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 🙂)

ethanj

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?

purplespider

I think I’d (wrongly) presumed that would give me the Element controller.

dorsetdigital

Try this: return (Controller::has_curr()) ? Controller::curr() : null;

purplespider

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? 🙂

dorsetdigital

The bottom of that issue is a workaround. Add an extension to the base element with a method that returns the current page controller