Jump to content

best practice: pages with multiple layouts.


kater
 Share

Recommended Posts

Cheers,

I'm curious how those of you with much more experience would solve this:

I have pages that may look like this:

1) title

2) large image (100% width)

3) text (100% width)

4) textblock  with 50% width image

5) 10 images as gallery (5col 2 rows)

6) text (100% width)

Those "elements" are freely choose- and stackable.

However, i want to use plain text fields rather than html textareas.

Very much like repeatable layout-modules in mailchimp templates.

How would you approach this?

My first idea was to use a parent page as article wrapper and output child pages which are based on individual templates. However, this negates the awesome simplicity of pw and might cause problems with searches.

thanks!

Link to comment
Share on other sites

You might want to have a look at this alpha module from Soma:

https://github.com/somatonic/BlocksContent

There is some discussion about it here:

https://processwire.com/talk/topic/4189-flexibility-in-page-design/?p=45437

You might want to browse further back in that thread too.

One other possibility might be the new PageTable field type which allows for adding multiple content blocks (you can define multiple templates) that can be sorted by the user, so you could easily have a separate Add button for each of your content types - I think this could be pretty effective actually.

There isn't any real documentation for PageTable yet, but you can start reading here:

https://processwire.com/talk/topic/6417-processwire-profields-table/page-2#entry62890

  • Like 3
Link to comment
Share on other sites

PageTables is definitely a great way to implement such things. I'm currently playing around with a new portfolio site and yesterday I build a project page with a big header and a few smaller images. With PageTables I can now freely alternate between vimeo videos, issuu embeds of pdf's or just images.

Link to comment
Share on other sites

Yes i think PageTables is great and the way to go.

However, i'll wait for the release to use it.

This site will only live for one year so this time i just went for checkbox layout-choices in the template.

It will render the pagelayout with one basic template / php.

this is pretty simple and intuitive in the backend. bloats the template file a bit.

cheers

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...