ryan Posted September 1, 2017 Share Posted September 1, 2017 Last week we talked about new Fieldset modules for ProcessWire, and I was happy to hear about all the enthusiasm for these. In that post, we primarily looked at the new FieldtypeFieldsetGroup module in detail. This week we'll continue along a similar subject and look at the new FieldtypeFieldsetPage module. Actually we'll do more than look at it, we'll release it – it's now in ProcessWire core version 3.0.74, ready for you to use: https://processwire.com/blog/posts/processwire-3.0.74-adds-new-fieldsetpage-field-type/ 10 Link to comment Share on other sites More sharing options...
abdus Posted September 1, 2017 Share Posted September 1, 2017 Hey @ryan loving these fieldset updates, keep them coming. I was holding myself not to start building a website until I can get my hands on these. Now having tried FieldtypeFieldsetPage, I've found it really useful for page meta (tags, categories etc) and SEO (seo title, desc) related fields. I also have a bug to report. ProcessPageEditLink crashes when it tries to get the list of files (when adding a link with CKEditor). It can handle basic repeater and repeater matrix pages properly but not FieldtypeFieldsetPage, and I get this error: Problem comes from this part. $repeaterPage is the id of repeater item, not a fully loaded Page instance. protected function getFilesPage(Page $page, $prefix = '') { $files = array(); foreach($page->template->fieldgroup as $field) { $type = $field->type; // ... } else if(wireInstanceOf($type, 'FieldtypeRepeater')) { $value = $page->get($field->name); if($value) foreach($page->get($field->name) as $repeaterPage){ // repeater page is page id, not a Page instance!! $files = array_merge($this->getFilesPage($repeaterPage, $field->getLabel() . ': '), $files); } } } return $files; } For now, I'm skipping FieldtypeFieldsetPage using: if(wireInstanceOf($type, 'FieldtypeFieldsetPage')) continue; 3 Link to comment Share on other sites More sharing options...
bernhard Posted September 2, 2017 Share Posted September 2, 2017 Since I read about the new fieldsets I'm thinking if it would make sense to have some kind of fieldset library. Maybe export jsons in github gists? Or maybe collect them just in a forum thread here... This could make it more easy and more efficient to share common fieldsets, like SEO, person details or the like. What do you guys think? 8 Link to comment Share on other sites More sharing options...
szabesz Posted September 2, 2017 Share Posted September 2, 2017 3 hours ago, bernhard said: What do you guys think? I strongly support it Some sort of organized way of doing it would be welcome. Maybe processwire-recipes.com could be used for this. processwire-recipes.com is not too updated these days and it has a somewhat confusing and "too many steps to follow" submitting+approval process. Quote: "In the near future we plan to implement a contribution form right here to sync back to the GitHub repo." Since the Universe is ageless, "near future" can be anything (in programming we call it Undefined ) however we could improve things a bit in this area. 1 Link to comment Share on other sites More sharing options...
Klenkes Posted September 5, 2017 Share Posted September 5, 2017 On 2.9.2017 at 0:10 AM, abdus said: I also have a bug to report. ProcessPageEditLink crashes when it tries to get the list of files (when adding a link with CKEditor). It can handle basic repeater and repeater matrix pages properly but not FieldtypeFieldsetPage, and I get this error: I second that. I cannot insert a link or edit a link in CKE on templates with FieldsetPage. Link to comment Share on other sites More sharing options...
matjazp Posted September 5, 2017 Share Posted September 5, 2017 Maybe this is related https://github.com/processwire/processwire/commit/d427b7f563f3024c1030265463ecaf79ab92d070 1 Link to comment Share on other sites More sharing options...
Klenkes Posted September 5, 2017 Share Posted September 5, 2017 I think not. The error occurs for me on pages with no repeater on it. Or perhaps I misunderstood... Link to comment Share on other sites More sharing options...
abdus Posted September 5, 2017 Share Posted September 5, 2017 23 minutes ago, Klenkes said: The error occurs for me on pages with no repeater on it There doesnt have to be a separate basic Repeater field. FieldtypeFieldsetPage extends Repeater fields, that's why the ProcessPageEditLink crashes. But with @ryan's fix, it's gone now ( just tried). Link to comment Share on other sites More sharing options...
Klenkes Posted September 5, 2017 Share Posted September 5, 2017 You are absolutely right! The fix works! Link to comment Share on other sites More sharing options...
cb2004 Posted September 5, 2017 Share Posted September 5, 2017 Amazing, but I would love to be able to select this to display in a tab without the label (but the label would be used as the tab title). 2 Link to comment Share on other sites More sharing options...
MrSnoozles Posted September 6, 2017 Share Posted September 6, 2017 Same here. I posted that in the blog comments already. I would like to see two things: 1. Be able to use this as a seperate tab (e.g. it's convenient to have all SEO related fields in a separate tab instead of mixed with the content) 2. Deprecation of fieldset (open). As far as I can see it the new fieldset types offer pretty much the same functionality but are much easier and faster to use Link to comment Share on other sites More sharing options...
cjx2240 Posted September 7, 2017 Share Posted September 7, 2017 FieldsetPage seems like the perfect answer to this question I posted a little while ago, is this the kind of situation it was done in aid of? What I had been doing til now (based on chatter in that thread) was making RepeaterMatrixes, creating all the repeater items using a super user, then restricting access to the "move/copy/new" etc controls using CSS. Link to comment Share on other sites More sharing options...
abdus Posted September 19, 2017 Share Posted September 19, 2017 When exporting a FieldtypeFieldsetPage using Setup > Fields > Export, repeater fields appears empty. Other repeater types (at least RepeaterMatrix) seem to export fine { "seo": { "id": 99, "type": "FieldtypeFieldsetPage", "flags": 0, // ... "repeaterFields": "", // empty "icon": "search", // ... } } Link to comment Share on other sites More sharing options...
ZGD Posted September 21, 2017 Share Posted September 21, 2017 (edited) Just noticed that FieldtypeFieldsetPage doesn't seem to be compatible with RepeaterMatrix, has anyone tried using either of the new FieldtypeFieldset modules within a RepeaterMatrix yet?EDIT I'd created the FieldtypeFieldsetPage fields using the API in a migration file, seems that re-saving them via the admin GUI solved the problem. Edited September 21, 2017 by ZGD Solved Issue Link to comment Share on other sites More sharing options...
HMCB Posted September 29, 2017 Share Posted September 29, 2017 Guess I'm lost. I just installed today's Dev release (3.0.77). I create my individual fields. I then go to create this new FieldsetPage field type, but it's not there. I have to choose Repeater, then FieldSet page becomes an option BUT ONLY AFTER the field has already been created. But once I switch over to FieldsetPage as the type of Repeater, it seems to break everything. My understanding is that FieldsetPage allows me to take any fields and group them together for reuse. I can then assigned that fieldset to a template. What am I missing? Link to comment Share on other sites More sharing options...
Robin S Posted September 30, 2017 Share Posted September 30, 2017 12 hours ago, HMCB said: I then go to create this new FieldsetPage field type, but it's not there. This fieldtype module is part of the core but it is not installed by default. Install it via Modules > Install > FieldtypeFieldsetPage 2 Link to comment Share on other sites More sharing options...
HMCB Posted September 30, 2017 Share Posted September 30, 2017 6 hours ago, Robin S said: This fieldtype module is part of the core but it is not installed by default. Install it via Modules > Install > FieldtypeFieldsetPage I already have it installed and it's dependencies. Ultimately, shouldn't it be as easy as: Create your individual fields. Assign those fields to the FieldsetPage field. Assign the FieldsetPage field to a template. Tada…the fields show up in the page edit/create screen. Link to comment Share on other sites More sharing options...
adrian Posted September 30, 2017 Share Posted September 30, 2017 27 minutes ago, HMCB said: I already have it installed and it's dependencies. Ultimately, shouldn't it be as easy as: Create your individual fields. Assign those fields to the FieldsetPage field. Assign the FieldsetPage field to a template. Tada…the fields show up in the page edit/create screen. Yep - that's how it's working here for me. 18 hours ago, HMCB said: But once I switch over to FieldsetPage as the type of Repeater, it seems to break everything. Are you trying to convert an existing Repeater field to a FieldsetPage field? I bet that is the problem. It looks like it is available an a type to change a repeater field to, but the settings might not actually be compatible - @ryan ? 1 Link to comment Share on other sites More sharing options...
HMCB Posted October 2, 2017 Share Posted October 2, 2017 On 9/30/2017 at 10:16 AM, adrian said: Yep - that's how it's working here for me. Are you trying to convert an existing Repeater field to a FieldsetPage field? I bet that is the problem. It looks like it is available an a type to change a repeater field to, but the settings might not actually be compatible - @ryan ? OK. This could have been an oversight on my end. I now see the FieldsetPage option in the dropdown when creating the field. My apologies. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now