Processwire - Field Types Usage
Welche Fieldtypes kann man für was benutzen ?
PageTables[Bearbeiten]
Der bessere Repeater
- Können i.d.R. eingesetzt werden wo man bisher Repeater eingesetzt hat
- Erzeugt neue Seiten (an einer wählbaren Stelle oder als Unterseiten). Repeater sind im Gegensatz irgendwo im Admin Bereich gespeichert und bekommen komische Namen mit denen man sie nicht mehr findet. PageTables sind besser im Backend organisiert.
- Erzeugt eigene Tabellen in der Datenbank -> besser zu verwalten wenn man mal exportieren etc. will. (prüfen ob das stimmt)
- Ein PageTable Feld kann mehrere Templates nutzen. Repeater nicht.
Fieldtype PageTable (free ProField)
Table Multipliers, Repeater or PageTable ?[Bearbeiten]
Ryans Kommentar von 2014
Table
Use this for tabular data, like rate tables or other things that you might typically represent in a spreadsheet. Use it for situations where you don't need the full-blown flexibility of repeaters, as it's technically more efficient with far less overhead than repeaters. Something like the Events Fieldtype could be very easily re-created via a Table field, but the potential uses are far broader. But for the most part, think tabular data when it comes to the Table field.
Multipliers
This is good for when you need a range of values (whether text, textarea, numbers, dates, etc.). If you are using repeaters with just one field in them, you might be a lot better off with a Multiplier. Like the Table field, Multipliers are very efficient and low overhead relative to something like Repeaters. Use Multipliers when you need to repeat a single input multiple times, optionally with a min and max number of inputs. Lets say you are building an employee directory, and each employee has between 1 and 3 email addresses. Rather than using 3 separate email fields, you would use 1 multiplier field and specify min=1 and max=3.
Repeaters
These are infinitely flexible in terms of what they represent, but each row of values is technically a page in the system. As a result, with the flexibility comes significant overhead. This is really only an issue when the quantity of repeater items gets high, or when you have lots (thousands) of pages using repeaters. I recommend repeaters for setting up things like homepage carousels. For example, if you go to the Villas of Distinction homepage, there are 3 separate repeaters in use on that page, each holding a photo, title, description, link. The client can have as many items in each of those sections as they want. Currently it looks like the first repeater as 6 items, the 2nd has 2, and the 3rd has 6. The possibilities of what can be represented with repeaters is endless, but look for potential alternatives when dealing with large quantities (whether large quantities of repeater items, or large quantities of pages using repeaters).
PageTable
The better Repeater
This is one of the ProFields that is available for free (thanks to Avoine sponsorship) on the ProcessWire dev branch. Meaning, it'll be available for everyone to use as part of the core in ProcessWire 2.5. And you can use it now if you don't mind running the dev branch. PageTable has all the flexibility of repeaters, but with lower overhead from the admin/input perspective. Rather than trying to bundle all the inputs on one screen, PageTable shows you a table of items and you click on the item to edit it in a modal window. This enables it to be a lot more efficient from the admin UI perspective. It's also more flexible than repeaters are in terms of where you store your items. PageTable lets you choose where they should live, whether as children of the page being edited, or as children of some other parent page you designate. They might be a little more work to setup than repeaters, but I think that most situations where you need the flexibility of repeaters may be better served by PageTable. PageTable still can't compete with the speed and efficiency of Table or Multiplier, but consider using PageTable anywhere that you might have used Repeaters before. Repeaters and PageTable are fundamentally different from the admin UI/input perspective, so you'd want to compare them yourself to see what suits your individual input needs better. PageTable involves more clicking to create and edit items, making Repeaters potentially faster for entering data rapidly. But PageTable will scale much further in the admin UI than Repeaters will, so I would personally favor PageTable in more situations than Repeaters.
Page Reference[Bearbeiten]
ProcessWire - Page Reference (Field)
Fieldsets[Bearbeiten]
Fieldsets fassen Felder im Backend zusammen. Es gibt ein paar Fieldtypes mit denen man Fieldsets erzeugt und die sich leicht unterscheiden. Fieldset Group (FieldtypeFieldsetGroup), Fieldset Page (FieldtypeFieldsetPage) und die Standard Fieldsets.
ProcessWire - Fieldsets