Jump to content

[SOLVED] How do you divide your page into logical sections?


Boost
 Share

Recommended Posts

Hei,

When you have a long page, how do you divide it into logical sections so it has better usability and is easier for the user? For example, look at this mockup (ignore the header and footer). It has six sections.

 mockup.thumb.png.4ab10874e112727f0a181d0017e82e56.png

Is there a way to setup the fields on the page into sections to resemble the above, instead of one after the other like this?

page.thumb.png.858bd2270cdbd40025afa4a4ff17ba0c.png

Link to comment
Share on other sites

With RockPageBuilder this would look like this:

vOWWUpw.png

You can easily create new blocks by clicking on the plus after the last block and every block consists of one PHP file for the business logic (if needed), one PHP/LATTE file for the output markup and optionally one .less file for the stylings:

miEu1ZZ.png

If you do it smart then you can even reuse these blocks in other projects just by copy and pasting these files ? 

Compared to RepeaterMatrix which would also be a possible solution RockPageBuilder comes with great integration and a complete UI for frontend editing:

g7stko4.png

So instead of using $block->headline to output the headline of the block you simply use $block->headline() and your headline will be frontend editable!! For non-text fields you can double click anywhere and the editing interface will be loaded in a modal. ?

IyvcIdV.png

I've not done a single website without that module for a very long time ? It will be 49€ for a single site for early birds. I'm working on the docs and on the webshop at the moment, but there are already several people from the forum using it for real projects, so if you are interested just write me a PM or signup to rock monthly to get notified when sales start ?? https://www.baumrock.com/rock-monthly/

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Hello!

I know exactly what you are meaning. Well you have at least three possibilites:

1. Use the Fieldset Page in ProcessWire. With this you can combine fields into one Fieldset. I don't use this Fielset anmyore but if I remember correct you have to install it from the "Core Modules Tab" (under: /processwire/module/).
You create a new field (name it for example fieldset_introduction) and then you add fields to it that you want to make use of (cool thing: you can reuse this fields in all other fieldset page fields and don't have to create a "body copy field" for each and everyone of them separetely!)

image.png.33e2b58e25c7f2e16c76848980c9c79d.png

And here is what it looks like on a page template. The fields shown above are aligned in a fieldset named "Introduction". You can add several Fieldsets this way and just put them in any order on your page template. 

image.thumb.png.f42aede2ec59121f2b507548f1d41904.png

2. Use the Repeater Matrix Pro Field. This ones commercial but it makes handling and editing Sections on your pages much easier and more flexible! 

Cool thing is that you can define your content blocks in the field settngs and add the needed fields right there. Then on your page template you can select the type of content block (or name it section):

image.thumb.png.fd5f5be943da86c469dbc8d5ae914511.png

After that it's super easy and comfortable to edit these sections and also change their order!

image.thumb.png.6c380619a988c10ce2218336a34f60c5.png

3. Use a third party page builder module like the RockPageBuilder from @bernhard. This module even beats the popular Repeater Matrix module in my opinion as it accelerates the creation and editing (and managing!) of content massively! Even better, it kind of combines the Repeater Matrix block-buidling functions with frontend editing which is a massive leap forward in terms of workflow optimization and customer happiness (cause it is also very easy to use for non-technically experienced users!).

image.thumb.png.61476f3f899b4ac132d15b0eda64117e.png

image.thumb.png.a60f2d7595b34bd489a8835bc8c0eaf6.png

  • Like 6
Link to comment
Share on other sites

1 hour ago, Ivan Gretsky said:

@bernhardis so productive I must have missed the RockPageBuilder thing. Can't find it on github. @Stefanowitsch, where did you get it?))

Ahh. Should've read it from the start) It is explained earlier in this thread.

Yeah I had the pleasure to be one of the earliest customers who uses this module and already made a few websites with it. Once it's released I will give some insight here in the board how I created this and that with it. It's a really powerful tool!

  • Like 1
Link to comment
Share on other sites

On 9/13/2023 at 12:36 PM, Stefanowitsch said:

1. Use the Fieldset Page in ProcessWire. With this you can combine fields into one Fieldset. I don't use this Fielset anmyore but if I remember correct you have to install it from the "Core Modules Tab" (under: /processwire/module/).

Hei @Stefanowitschjust one question. For the FieldsetPage approach, do you create specific fields for it? For example, I have a single image field that I use in multiple templates, but for use on my FieldsetPage, I would like that the single image field have a fixed image height and width (which is specific only to one template). So, how do you work on this case? Do you create another image field, or is there a way to customise field properties inside the Fieldset page?

Link to comment
Share on other sites

6 hours ago, Boost said:

Hei @Stefanowitschjust one question. For the FieldsetPage approach, do you create specific fields for it? For example, I have a single image field that I use in multiple templates, but for use on my FieldsetPage, I would like that the single image field have a fixed image height and width (which is specific only to one template). So, how do you work on this case? Do you create another image field, or is there a way to customise field properties inside the Fieldset page?

I like to re-use most of the fields. For example in most projects i have one body field, one headline field and one (single) image field. With fieldsets I can reuse these fields as often an as much on a single template as I want. As long as the field settings not differ that much there is no use to create a "body2" or "body3" field.

BUT if you need to alter the field settings in one case it is possible to override these changes on a fieldset-basis.

For example I have this fieldset here with two generic input fields: A single image field and a body copy field.

image.thumb.png.e465e8952d588687c06e8fc306115ac1.png

These are generic fields that I use all over the place.

If I want to make slight changes to those fields in the context of the fieldset I can edit the fieldset and then click on the name of one of the fields inside it.
This will open a dialogue where you can override very basic field settings.

It is in most cases not possible to customize a field very much this way. For example you can't change the width and height cropping properties on an image field.

 

  • Like 1
Link to comment
Share on other sites

  • Boost changed the title to [SOLVED] How do you divide your page into logical sections?
  • 3 weeks later...

Don't forget that you can define/allow overrides for templates based on inputfield settings in the "Overrides" tab of the field. Then the template(s) can allow the override of those particular settings of the field. Alternatively, you don't have to think only about the template settings - you can edit the rendering of the PHP template and check what the current template is, and then render the image's size differently depending on the template. You have the control! ?

Image Inputfield Overrides:

image.thumb.png.ba6950c7380a744996a6bbc6d9f2e005.png

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...