Development | Updates - 21/02/21 #551
johanjanssens
announced in
Announcements
Replies: 1 comment
-
Lots of toys for me in this one :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A little update on the work done in the past week.
1. Custom field improvements
Worked with @kbrookes on improving the custom field support to make it easier to grab fields for a specific field group and to get a flatten array of all the field values.
You can retrieve the fields for a specific group by using the new
group([name])
method<? $group = collection()->fields->group('[name]') ?>
You can retrieve an associative array of field values using the new
values()
method<? $values = collection()->fields->group('[name]')->values() ?>
For more info see: #363
2. Layout improvements
Based on a question from @kbrookes worked on making it easier to get and set the layout properties in a scenario where you want to set layout properties dynamically for example by retrieving them from a custom field group. You can find the complete discussion here: #545
To make this easier, together with the custom field improvements reworked the layout property handling as part of #540 Layout properties are now recursively loaded and merged before the page is rendered, this gives you access to all layout properties in the page and in any layout, or partial.
For example, consider you have, a page using a article layout that extends from the default layout, each defining different layout properties:
/pages/page.html.php
/layouts/article.hmtl.php
--- layout: default options: bar: defined_in_article_layout --- <ktml:content>
/layouts/default.hmtl.php
The result would be
Also added a new
layout()
method to make it easier to get the layout properties, it returns a config object and when cast to a string will output JSON.More changes for the layout property handling are planned as part of 0.20 release see also following issue https://github.com/joomlatools/joomlatools-pages/issues/547
3. Released v0.19.6
The v0.19.6 release is out with various improvements and bug fixes. More info: https://github.com/joomlatools/joomlatools-pages/releases/tag/v0.19.6
Happy coding!
Beta Was this translation helpful? Give feedback.
All reactions