Jump to content

PW 3.0.5: More Repeaters, Repeater Matrix released & New Field Rendering


ryan
 Share

Recommended Posts

This week we've released ProcessWire version 3.0.5 which actually contains quite a lot of changes. Now you can nest repeater fields (repeaters in repeaters) and use dynamic/AJAX loading for all items. Plus we've got the first test version of Repeater Matrix released, and new support for field templates

https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/

  • Like 16
Link to comment
Share on other sites

Yay! This update has me rather excited, and I can already see an overhaul of our course booking system coming up in the near future. Nested repeaters and field templating are just the things to streamline this quite spectacularly. Dynamic Ajax loading is going to be such a treat too!

Ryan, if you keep up PW's innovation speed like this, I'm sooner or later going step on my tongue while I race to make us of all these new possibilities! ;)

  • Like 2
Link to comment
Share on other sites

I was very excited about the Repeater Matrix, so I immediately wanted to try it out and upgrade my devns v. 3.0.4 to 3.0.5.

It's the minimal site profile (multilang). I got errors re: 

$content .= renderNav($page->children);

$sidebar = renderNavTree($page->rootParent, 3);

Error: Call to undefined function ProcessWire\renderNavTree() (line 20 of C:\Program Files (x86)\Ampps\www\ProcessWire-devns\site\assets\cache\FileCompiler\site\templates\basic-page.php)

Seems like it's related to my previous post in the Pro Fields Download forum thread...

Update:

I have changed all templates to have this setting in "Files" tab > Use Compiled File?:

instead the recommended "yes (and include files)"

I have chosen "yes (template file only)"

Everything back to normal now. Seems like relative paths (like the _func.php from the default site-profile) do not properly get cached with the "compiled file" recommended setting.

Perhaps it's safer to use

include_once( $config->paths->templates . "_func.php");

in _init.php, instead of

include_once( "./_func.php");

Link to comment
Share on other sites

Massive update!

As for field templates, how about distinguishing them by templates?

For example:

body.php for all templates,

body-home.php for body field for home template,

body-contact.php for th contact template?

  • Like 2
Link to comment
Share on other sites

It's the minimal site profile (multilang). I got errors re: 

@dragan, I think this is the same issue that you were seeing with ProFields (per your topic there). I think PW is having trouble understanding your paths, potentially due to the spaces present in the path names and/or something to do with your Windows environment. I've not seen any other instances of this particular issue, but I'm going to be taking a closer look at the files you sent me and hopefully we can track it down. Hopefully we can resolve it with an adjustment to FileCompiler, but I've just not been able to identify what we need to adjust yet. 

As for field templates, how about distinguishing them by templates?

@tpr It's funny you should mention that because the support is already built in. I didn't document it yet because I wasn't sure I was going to keep it there. But sounds like maybe we should keep it there. The format it uses is this:

field.template.php

example: body.basic-page.php

Since this is already built in, you can try it out now if you'd like. It checks for a template-specific file before a general purpose one. It will use the template-specific one if present, or the general purpose one if not. 

  • Like 2
Link to comment
Share on other sites

Field templates are like natural, built-in "partials". I'm super-excited about the repeater matrix but the field templates are a superb, micro-optimization that will bind very specific output with a field type. I think this will make for a much more efficient way of building pages and especially so when those pages include repeater matrix fields.

Very awesome and genuinely exciting.

  • Like 1
Link to comment
Share on other sites

Regarding nested repeaters, would it be possible to nest the same repeater field under itself?  It's currently not possible, but that would be awesome.

A potential use case is for creating a custom menu builder purely with repeaters.

jonithlnljani how ? wolud makes.infinite ploop no ?

or how u.say in englich. circle jerkey or.recurses no ending.samasaras

likes when trimmer beard in.bathroon w 2 mirror & u see millonions of willys

This takes me back a few years :rolleyes: https://processwire.com/talk/topic/1358-repeater-inside-itself/

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