nurkka Posted Friday at 09:26 AM Share Posted Friday at 09:26 AM I am trying to sort the blocks in the page editor via "sort" and "sortGroup", but they are still sorted alphabetically. I tried every combination of "group", "groupSort" and "sort" with and without various values, but with no luck. Does anyone know how to sort the blocks? Additional question: Is there a feature to copy/clone blocks within the page editor? Thanks in advance! Link to comment Share on other sites More sharing options...
bernhard Posted Friday at 01:14 PM Share Posted Friday at 01:14 PM Hey @nurkka thx for your question! I think that I just changed this as some point in time as I've never really been using the sort feature. It turned out to be less useful than I thought and having them sorted alphabetically with a filter input seemed the better option. I think it should be quite easy though to restore the old behaviour via config setting. Would that help? Or are you just playing around with it and I can remove that info from the docs? 3 hours ago, nurkka said: Additional question: Is there a feature to copy/clone blocks within the page editor? This is unfortunately not possible at the moment 🙈 Link to comment Share on other sites More sharing options...
nurkka Posted Friday at 02:06 PM Author Share Posted Friday at 02:06 PM Thanks @bernhard ! I am using RockPageBuilder for the first time and already in a real client project, which I have to finish until next week 🙂 The project is a small company website with at most six to seven different block types per page. But for the client resp. the person who will be adding new content pages, it would be great, if the blocks had the same order as they are appearing in the layout and on already finished pages. So it would be great if you could add back the sorting. But if the sorting has unwanted side effects, then it would surely be better to just remove it from the docs ... Regarding the copy/clone feature: That would be a great addition! I built some websites and also content management backends for onlineshops with RepeaterMatrix, and when I talked to the clients afterwards, the copy mechanism is always something they are using really often. Would be great to have this available also in RockPageBuilder! Link to comment Share on other sites More sharing options...
bernhard Posted Friday at 02:08 PM Share Posted Friday at 02:08 PM 2 minutes ago, nurkka said: But for the client resp. the person who will be adding new content pages, it would be great, if the blocks had the same order as they are appearing in the layout and on already finished pages. What do you mean exactly? 🙂 Link to comment Share on other sites More sharing options...
nurkka Posted Friday at 02:10 PM Author Share Posted Friday at 02:10 PM I just wanted to explain, why a client would benefit from pre-sorted blocks in the page editor 🙂 Link to comment Share on other sites More sharing options...
bernhard Posted Friday at 02:11 PM Share Posted Friday at 02:11 PM Yeah but I don't understand what you mean by "same order as they are appearing in the layout". Because clients can rearrange blocks and then there is no unified sort order?! Link to comment Share on other sites More sharing options...
nurkka Posted Friday at 02:25 PM Author Share Posted Friday at 02:25 PM Sorry! I meant it would be easier for editor users, if the blocks in the page editor could have the same order as they have initially regarding to the given layout of the page. For example let's say every page always starts with a HeroImage, but the corresponding block would be the fifth in the list of available blocks. So the editors will have to search through the blocks to find the right one to start with, and so on. Of course, they can move the blocks around. But in my experience, they won't do that. They will always follow the same order of blocks. Therefore, I thought they would benefit from pre-sorted blocks, as they can go through them from left to right. Or am I misunderstanding something? I meant the sort order of the "create new block of type XY" icons. 🙂 1 Link to comment Share on other sites More sharing options...
bernhard Posted Friday at 02:43 PM Share Posted Friday at 02:43 PM Ah! Now I get it 🙂 That makes a lot of sense. I'll try to come up with something useful as soon as possible, thx 🙂 1 Link to comment Share on other sites More sharing options...
bernhard Posted 23 hours ago Share Posted 23 hours ago Hey @nurkka I have something for you 😎 Please download v5.9.0 https://www.baumrock.com/en/releases/rockpagebuilder/ All you have to do is add a hook like this to /site/ready.php: wire()->addHookAfter( 'RockPageBuilder::getPresets', function (HookEvent $event) { $page = $event->arguments(0); $field = $event->arguments(1); if ($page->template != 'blogitem') return; if ($field->name != 'rockpagebuilder_blocks') return; $event->return = [ 'Demo' => [ 'Alert', 'Features', 'Features', 'Videos', ], ]; }); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now