Jump to content

Module want: Repeatable elements


almonk
 Share

Recommended Posts

Yes I figured that the simplest thing to do would have a "Quotes" page with children that have the title, quote, person, date, etc will work.

It just struck me as being somewhat tidier to have all of that data encapsulated within a singular array on the "Quotes" page.

I'll keep an eye on developments in future as undoubtedly I'll have something more complex later!

Link to comment
Share on other sites

True, it is potentially subjective choice on which works better in my particular case.

Personally it makes no difference to myself which way I implement it, but my suspicion is that for my client's user experience it'd be simpler to keep adding quotes to that given page.

Guess the challenge for me is to help him understand  :D

Link to comment
Share on other sites

  • 6 months later...

Hey all,

Great CMS Ryan, I've really grown to like it in the space of just a few hours!

Just thought I'd bump this thread because when starting to develop a page I was looking for a field type / module that could provide this functionality - for example  it would be perfect for creating bespoke list elements primarily for a client to add themselves rather than hard code <li>'s etc!

Was this development ever fully finished? I'd love to try it out or help test / debug to make it an integrated part of the CMS.

Harry

Link to comment
Share on other sites

Hey Apeisa,

Great stuff, I'll check back regularly to keep up with updates and future releases.

Really like the interface, it's easy to use from fresh and super intuitive.

I'll stick with the Textarea and also using several fields for now, but will eagerly await 2.4!

~ Harry

Link to comment
Share on other sites

  • 4 weeks later...

I also agree that a matrix style interface would be a very useful for content editors.

I think @martinluff mentioned earlier in the thread, that the image field is actually very close to what we need. It's a repeatable element with a textfield. Maybe just take out the image part and call it a repeatable textfield.

I am currently using a textarea to list opening times for museums. I want to show what museums are open today / tomorrow. I put each day of the week and opening times on a single row, separated by a semicolon ;

In my template, I turn that into an array and parse thought it (if today > show museum).

The textarea solution is fine for me to edit, but if I ask a normal user to do this, it won't be long before it breaks. That's where a simple repeatable element would be useful.

Link to comment
Share on other sites

Repeatable fields are planned for 2.4, though we may get some rudimentary variations of it before that.

May I ask if you have a roadmap or an estimate? I really like Processwire and I would feel much more comfortable to use it on larger-scale projects if I knew the project have important milestones in a reasonable time-frame.

edit: do you also accept donations or have a commercial end that offers customization? that'd be great to know^^

Link to comment
Share on other sites

May I ask if you have a roadmap or an estimate? I really like Processwire and I would feel much more comfortable to use it on larger-scale projects if I knew the project have important milestones in a reasonable time-frame.

Here is a link to the roadmap, though it's a bit of a work in progress as I've not yet added everything to it that should be added:

http://processwire.com/about/roadmap/

The direction of the roadmap is dictated by equal parts of:

  • What features are consistent with the needs of the development team and the clients they work with.
  • What features are most requested by the community.
  • What features are others wanting to sponsor the development of.
  • What features are most tangible to accomplish in the short term.

edit: do you also accept donations or have a commercial end that offers customization? that'd be great to know^^

We don't accept donations, but you can sponsor development of ProcessWire features. For instance, if there is something that you need and you want to see it happen sooner rather than later, then we can give you an estimate and timeline to build it. For instance, the company that @apeisa works for is sponsoring the development of the multi language support in the admin planned for 2.2 (currently in progress). My company (RCD) specializes in the design and development of ProcessWire sites, as well as the development of custom modules in ProcessWire, so please feel free to email me if you'd like to talk more, my email is ryan at this domain name.

Link to comment
Share on other sites

For answering to this http://processwire.com/talk/index.php/topic,621.0.html, i revisited this thread and thought again about it. Maybe this can be done without breaking the way processwire naturaly behaves.

This field type could simply mirror inside the edit page one branch of the tree. It can be only an interface to create children of a page from inside the editing of another page (or even the same, whatever...)

  • So, while creating the field, we would only have to define a preexisting page to be the parent of our repeatable elements.
  • On the edit page, this field type could work much like the image field already works.
  • When adding a new repeatable element, a new page would be automatically created under the parent that we defined while creating the field.
  • The fields for each element would be the same from the template that was chosen for the children of our parent page (or could be even different for each element of the group if the editor as permission to choose the template).
  • Templating would target the tree normaly and ignore this field..
  • The editor would have the feeling of creating repeatable elements inside a page, but everything would still work on a processwire way.

Would this be easy to implement has a module?

I'm getting quite sleepy but i hope i was clear enough :)

Link to comment
Share on other sites

Good ideas Diogo! This really may be a feasible way to accomplish this type of field without major changes underneath, while also enabling any existing field to be repeatable without consideration from the fieldtype/inputfield. Or to word it differently, a simpler approach that is more powerful than the alternative. I am enthusiastic about this approach… it's something we should continue thinking and talking about.

Link to comment
Share on other sites

Nice! I'm glad you liked the idea :)

It occurred to me that it might be less simple to do it as i imagined. If inside pages there are already children, The children created by the field would be mixed with them... quite confusing...

Instead, maybe it would be better to have a special page dedicated to this field type (like the admin page, or the trash page).

> Admin

> Repeatable field type

    > Edited page A

           > Repeated field of A 1

           > Repeated field of A 2

           > Repeated field of A 3

    > Edited page B

           > Repeated field of B 1

           > Repeated field of B 2

           > Repeated field of B 3

> Trash

Link to comment
Share on other sites

I also like this approach very much. Actually I had the same idea in January (last paragraph), but didn't give that thought too much thoughts back then. I think that in symphony cms there is good implementation if this method.

Other scenarios where this approach would shine is ie. tags. You could keep tags as their own pages, but could add new pages when adding new blog posts. Also - you could add architects while editing your skyscraper etc.

Link to comment
Share on other sites

Well, I believe I thought about it too ;)

Anyway, having some hidden page title for instance 'repeatables' in the 'admin' tree is the best option IMO – that way, you don't have repeatables and 'real' children mixed up either in tree or in the matrix editor in admin (or both). Same thing Diogo said, only I would hide it in admin, so you don't see it unless you need to;

This would be minimal viable product; possibility to select one of existent templates, and have possibility to add/edit/remove them in the 'edit page' of their parent page; In next release, you could add creation on the fly: by adding a column, current 'repeatable' template would be cloned and another field added. Or something like that.

Link to comment
Share on other sites

pretty quick reply here, because i'm in the middle of something.

I had the same idea in January (last paragraph)

Ya, It's quite true!  It's a pitty that it was so unnoticed by then.

But it doesn't even have to be done with ajax, processwire API can take care of this by its own, no?

I think that in symphony cms there is good implementation if this method.

http://symphony-cms.com/download/extensions/view/41121/ You are referring to this right? I remember it from when i used Symphony on one project. As i remember it's a slightly different approach and the implementation didn't feel that natural. Maybe because of the way Symphony works. I think in Processwire it would be much simpler to do it. Anyway, as i told in other threads, Symphony it's a very well thought CMS, and it touches PW in some points.

Link to comment
Share on other sites

It seems like we've got good ideas and momentum here and I'm very enthusiastic about getting this setup. I need to focus on getting the multi language features finalized first, but would like to start working on this afterwards while it's still fresh on everyone's mind. :)

Link to comment
Share on other sites

  • 2 weeks later...

Well you have my +1 on this too. I think the Symphony approach works well since you're essentially using a page link field BUT with the capacity to add new pages from the page you're linking from AND fill in their data in a row-based table layout plus, as pointed out, it keeps to the overall methods already in place with PW and enables normalisation of and sharing data from one pages's 'matrix' to any others.

Link to comment
Share on other sites

Martin, do you know if there are any documentation/demonstrations/videos of Symphony's method here online? Just looking for a good starting place to read more about what they are doing in this respect.

Link to comment
Share on other sites

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