Jump to content

Repeater with mixed fieldtypes


tires
 Share

Recommended Posts

Hi!

I am searching for a module to create different fields on a page in free order.

For example i want to have 3 fieldtypes: for a small picture, a big picture and a headline.

Than i will create on my page something like this:

  1. Headline
  2. Small picture
  3. Big picture
  4. Small picture
  5. Small picture
  6. Headline
  7. ... etc.

On an other page the order of fields should be totally different:

  1. Big picture
  2. Small picture
  3. Headline
  4. Headline
  5. Headline
  6. ... etc.

This is basically the way to create content in typo3 and others.

Is there a module that let my do this?

Thanks for your answers!

tires

Link to comment
Share on other sites

Hello Adrian,

thanks a lot for your answer ... and for your welcome :-)

Can i use this module also in 2.4? Or is there a simular module for 2.4?

What if i need more than just an image, headline or textblock.

In my case i need an headline, link and a caption for every image.

Is this also possible with this module?

Link to comment
Share on other sites

PageTable won't work on 2.4 (I am fairly certain there were some core changes required), but there should be no reason not to upgrade your site to 2.5. Is there a reason your hesitant to upgrade?

Page Table can handle any fieldtype/template combination you need, so you can definitely use headline, link, caption etc

Link to comment
Share on other sites

Hi Adrian,

thanks once again!

I tried out the modul.

For me it seems a bit "excessive" to create a new page for every single "headline/link/caption/image"-combination.

But this is only/best way to handle this in processwire?

Link to comment
Share on other sites

I know it may feel excessive, but this is one of those things in PW that seems a little crazy in the beginning, but really does work out amazingly well. I would recommend the option to store these pages under a central parent outside the structure of your site. Use the "Select a parent for items" on the Details tab. I usually also use the Automatic Page Name Format option on the Input tab.

I struggled with the concept of a black box of pages, but once I stopped worrying about, it really does work well.

  • Like 1
Link to comment
Share on other sites

You could do it with repeater fields also.

The Repeater contains every possible fieldtype. Image (Big/Small Images), Textfield (Headline) etc.
Additional you need a select-field (http://modules.processwire.com/modules/fieldtype-select/) and put all the possible inputfields as a Option into this field.

Finally you have to configure the inputfields (Images, Textfield...) inside the Repeater-Field with Inputfield-Dependencies (https://processwire.com/api/selectors/inputfield-dependencies/), that they are only visible, if the option in the select-field is choosen.

Link to comment
Share on other sites

I work mostly with Concrete5, which also has this functionality you're looking for. Check out this forum thread where I asked the same question and got some details on how exactly to set up the PageTableExtended field to work the way I wanted it to:

https://processwire.com/talk/topic/7477-strategy-for-flexible-content-types-in-a-template/

I'm currently working on a plugin/module that will handle all of that for you automatically... basically you will create "blocks" which are groups of fields, then you will have a mini-template for each block (so you can output the fields however you need to), and an "Area" field (a PageTableExtended field) you can add to templates. Site editors can then add any kind of "blocks" to those "areas" (exactly as you've described in your question).

I'm working on it in my free time so not sure when it will be ready, but I've made great progress so far so hopefully in the not-too-distant future. (I really want to try out ProcessWire on a real site, but I can't go back to a system that doesn't have these flexible content blocks / areas after getting spoiled with them in Concrete5 :)

Link to comment
Share on other sites

I'm still not sure how all that is different from what Pagetable already does. I create block templates with the fields I need then add it to a pagetable field and use the template files to output the blocks. They can be sorted and published etc. It's easy to setup and use. Pagetable extended by mademyday can be used to see the output directly in the pagetable. I can be used for different things not just blocks. What else is there needed?

  • Like 2
Link to comment
Share on other sites

Under the hood it's the same thing. But it requires a lot of fiddling with fields and templates to make it work the way I want it to work (which of course might be different from how you want it to work, and that's okay -- I think that is the great strength of ProcessWire, because it leaves things very open to doing them in different ways).

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