Jump to content

Let the author choose the content layout


AndreKR
 Share

Recommended Posts

I am fairly new to PW. I understand how the system of pages, templates and fields works in general and I can work with them in the case where the content layout is fixed.

However, if you take your average modern bs page like this one: http://jaasjs.com/, there are several sections:

  • Section 1, Just text
  • Section 2: Just text (actually two columns, but I think that can be done with a Repeater field)
  • Section 3: Just text (actually four columns, but ditto)
  • Section 4: Three boxes with prices
  • Section 5: Just text
  • Section 6: Three quotes
  • Section 7: A button

Now if the content editors feel like they want to add another section with three hipster quotes between Section 2 and 3, I want them to be able to do that.

How would I structure the pages, templates and fields for such a page? At first I was thinking of using subpages for sections, but when I do that, where would I put the actual subpages.

Link to comment
Share on other sites

Hej,

you could use the PageTable field (included module, but you have to install it) - have a look here: 

or go with the RepeaterMatrix Profield: (I'd recommend that, it is worth the money!)
https://processwire.com/api/modules/profields/repeater-matrix/

or use subpages with a simple Pagefield on the 'parent page'.
You can arrange the items in the pagefield of the parent with the according InputfiedType. That would define the order. But you'd have to manually create the pages first outside that parent page. It is technically very similar to the pagetable-approach but with less comfort.

Hope that helps!

cheers
Steffen

  • Like 6
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...