Jump to content
Mustafa-Online

Gutenberg For ProcessWire ?!

Recommended Posts

22 minutes ago, Ivan Gretsky said:

Nobody's talking about bringing content builder stuff to the core.

This. Please read this before you post. Not a single person here has, to my best understanding, suggested that there should be a page builder in the core. This very topic is in the Modules/Plugins development area of the forum. This topic is not about the ProcessWire core.

Thank you 🙂

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, Ivan Gretsky said:

Nobody's talking about bringing content builder stuff to the core. I guess only Ryan could))

Excellent.

3 hours ago, Ivan Gretsky said:

js page api was on the roadmap. Might be a good fit here once it's done.

Do you mean a native/ProcessWire core way to output JSON data from the databse through the use of a then native REST api that is called with vanilla JS?
That is, as far as I can see from being about 48h into ProcessWire, the only thing I could not find.
But again I found modules that do this, so perhaps leave it in modules?

it would somehow be very cool though to have core team approved modules that work with the Basic site profile so devs new to this can build from there and learn.
Is there a core dev team or is Ryan the one and only being able to commit to ProcessWire?

I agree though in a certain way. There are devs that work per client requirements and then there are web designers that just want a page-builder to be able to sell websites/themes that then clients might buy without having to hire a dev while also wanting to use ProcessWire. I guess for the later such a page-builder would come in very handy.

I am raised with the "build it yourself" frame of mind, sure not re-inventing the wheel, though the satisfaction of knowing what source will be produced is very important to me, especially knowing where the source code comes from, meaning what in the end is responsible for each line of code that the browser gets to render.

But.. given a module would be made that enables devs to output clean code without having to load external libs into the frontend while also being an advantage to devs in the sense that snippets/blocks of code/content sections could be easily dropped and dragged in the backend, well I would at least give it a shot, given it is clean and does not interfere with ProcessWire, meaning if you remove such a module the database and source code produce the same result in the frontend.

3 hours ago, Ivan Gretsky said:

But the request for content building is high. Content is king. And RepeaterMatrix + Hanna codes are not as user friendly as Gutenberg seem to be. SPA editing is way more pleasant than opening and saving things one after another and adding images only after 1st save.

Quality content is kind. There is tons of well designed websites with plain bad content. I don't see Gutenberg being user friendly or a real thing to look at as a reference for what could be useful for ProcessWire in terms of SPA editing. My experience with Gutenberg was that is made me feel that the entire dashboard has become very brittle on a psychological level, meaning, you click, it shows up, but if it really is saved and will work is a different matter. Often the preview would not render anything, blank page. At least for me, opening and saving things one after another makes me feel much more in control, knowing what why when and where code will be in the frontend. But this is just personal preference. I guess I like things clean, working and working well.

Bottom line, I do not find the idea bad per se, I just think something like this requires a lot of thought and careful use case consideration before any code is written, i.e. who would benefit most from such a SPA editing module and what would be the implications for ProcessWire.

I say let's first get that JS api going if I understood you correctly that that is/was on the roadmap.

  • Like 3

Share this post


Link to post
Share on other sites
3 hours ago, teppo said:

This. Please read this before you post. Not a single person here has, to my best understanding, suggested that there should be a page builder in the core. This very topic is in the Modules/Plugins development area of the forum. This topic is not about the ProcessWire core.

Thank you 🙂

Thank you for pointing this out. Very new to all this. Will be more cautious and take the time to, as much as I can, read most of the thread before posting. No bad intentions here. I guess I am still under shock for what happened with WP and Gutenberg, saw the title and felt it would be good to voice my concern before things get going. Thank you indeed.

  • Like 4

Share this post


Link to post
Share on other sites
2 hours ago, happywire said:

No bad intentions here.

No worries – no hard feelings here either! It's just that folks sometimes miss the point that having a module that does x for ProcessWire doesn't mean that ProcessWire itself, as in the core package, needs to do that. In this thread alone we've had some posts where this point has been lost.

What third parties (such as me) build on top of ProcessWire does not have a direct impact on the core.

I get that this is a topic that can bring some emotions to the surface, so trust me: I for one would not like to see ProcessWire go the "page builder route". At the same time I see a lot of value in having a block editor style Fieldtype – or something similar – as a module that one can plug in if and when that sort of feature makes sense 🙂

Share this post


Link to post
Share on other sites
9 hours ago, bernhard said:

which library are you using for this drag&drop magic and also for the side panel?

It's jQuery UI! And the sidepanel is just an animated div, nothing fancy really. 

  • Like 3

Share this post


Link to post
Share on other sites
9 hours ago, happywire said:

Totally agree. Keep ProcessWire clean and do what you like to do in the backend.
Having a default editor that all new devs/clients must use would ruin ProcessWire for good.
More a fan of "build it yourself, nice and clean" than "click and drag it yourself" .. and be left with a mess of badly performing source code full of external libs etc.

We are using the included in PW jQueryUI drag, drop, sorter. 

  • Like 3

Share this post


Link to post
Share on other sites

This is an interesting topic!

Iam a designer that learned to code and PW really helped me improving my coding skill.
I don't want the client to control the layout/design to much. 
In my experience this results in clients messing up the design of the website.
So the functionality to change the design should be configurable to a certain role.
But I would like a way to change the layout of my blocks in the backend without touching my template code.
Ideally in a WYSIWYG way. So I would like to only have one template for all my pages with blocks that I define.

A workflow that would make sense to me, and would save me a lot of time (for larger websites with a lot of different layouts per page):
1. The client would add blocks to a page, which layout in a default way (that I define). If the default way is not good enough, proceed to step 2-4
2. The client saves the page without publishing
3. I would edit the design right in the PW backend and show it to the client.
4. The client approves the design and the page gets published

I implemented a solution using blocks with PageTableExtended and it worked quite good, but had some things that could be improved, like ajax editing the content, without the need of opening a modal to edit the content. I will make a post on my use case soon.

Looking around in the forum I also found this post by Theo (he uses a WYSIWYG wich is far superior to mine from a usability standpoint):

Demo:
http://theowp.bplaced.net/upload/pics.html
http://theowp.bplaced.net/upload/prev3.html

Share this post


Link to post
Share on other sites
On 5/21/2019 at 5:54 AM, jploch said:

I implemented a solution using blocks with PageTableExtended and it worked quite good, but had some things that could be improved, like ajax editing the content, without the need of opening a modal to edit the content. I will make a post on my use case soon.

RepeaterMatrix is going to be the best choice for any type of page builder in ProcessWire (at least at this time).  The recent updates to the module improve its flexibility further, such as being able to change the matrix-type of an item that's already been added to a page (this is similar to Gutenberg functionality of being able to change block-types... nice).

After using RepeaterMatrix and its equivalents in other CMSes over the years (such as WordPress ACF Flexible Content field), my suggestion is you're better off NOT providing fully customizable layout functionality within your builder (that is, avoid the capability of allowing users to add things like containers, rows, columns).  I've personally found that even other CMSes that do this well and are built around that concept are just too clunky.  It's the nature of the beast.

The better approach in my opinion is to provide a good set (5-10) of matrix-types/blocks that can instead achieve this.  Once again, the recent feature addition whereby matrix types can be changed is going to help here since switching a matrix-type retains its content as long as the matrix-type you are switching to uses the same fields.

  • Like 5

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MilenKo
      Hello guys.
      I've decided to get brave and start my first delayed output profile for a remake of my knowledge sharing profile. It went all.good so far but I decided to make it multilingual as to fit the users needs.
      For starters, added a field named: image_single and limited the input to one image as this would be used for the logo. Added.the markup to allow the front end editing (method D or direct edit tag to the <img>. After double clicking on the image, I see the pop-up showing up for a second and then closes. As far as there are no errors in the logs, I am a bit stuck to find the reason. I've read earlier that some users had issues with multilingual fields but could not find anything to point me to the right direction. Any ideas or suggestions?
    • By pwuser1
      Hi people I think I have seen them all but maybe I missed some of the just wanted to know what do you recommend for an editor with JQuery autocompletion or support? 
    • By abdus
      There's native `Fieldset in Tab` for creating editor tabs, but sometimes it could make more sense to put a field that's not directly related to `Content` into `Settings` or `Children` tab (such as for body class or some toggles that I see being used often). You can use the hook below to move fields between the tabs.
       

       
      // site/ready.php wire()->addHookAfter('ProcessPageEdit::buildForm', function (HookEvent $e) { // make sure we're editing a page and not a user if ($e->process != 'ProcessPageEdit') return; // RESTRICT BY TEMPLATE // $page = $e->object->getPage(); // if ($page->template != 'home') return; // RESTRICT BY ROLE // $user = $e->user; // if (!$user->hasRole('editor')) return; $form = $e->return; $contentTab = $form->children->get('id=ProcessPageEditContent'); $settingsTab = $form->children->get('id=ProcessPageEditSettings'); // $childrenTab = $form->children->get('id=ProcessPageEditChildren'); // if page template is set noSettings = true, $settings will not exist if (!$settingsTab) return; // MOVE TITLE FIELD TO SETTINGS TAB $title = $contentTab->get('title'); if (!$title) return; $contentTab->remove('title'); $settingsTab->prepend($title); });  
       
    • By hellomoto
      I have a manufacturers page select field and a dependent models one with pages of template `model` which are allowed children of pages with template `manufacturer`. So I have this as the findPagesCode for the models page options field:
      return $page->manufacturer->children(); However this requires the page be saved in order to display options. This is not ideal. 
      I have a singular autoload module with the following:
      public function init() { $this->pages->addHookAfter('render', $this, 'filterModels'); } public function filterModels($event) { $page = $event->arguments('page'); if($page->template != 'boat_vessel') return; $this->message("models filter"); } It's doing nothing. 
      I was thinking I could work out something with this example but I would need the above test to be working first anyway...
      $this->pages->addHookAfter('changed', function(HookEvent $event) { $page = $event->object; $change = $event->arguments(0); if($page->template == 'boat_vessel' && $change == 'manufacturer') { // execute some code } }); But what? How do I refresh the models field?
      Is there a way to do this in the field settings? I would think in the custom PHP textarea that `return $page->manufacturer->children();` would work but it doesn't. 
    • By Soma
      There's a permission for allowing editor to use the translator in PW 2.73. I could need this but it doesn't work. It shows the "Language" in the menu but when opening the page it says no entries to show. Anybody has some experience using the lang-edit permission for editor? 
×
×
  • Create New...