Alpine418 Posted May 23, 2019 Posted May 23, 2019 Hi folks, I'm new to PW and have to say: I really like it! After 15 years of using WebsiteBaker or similar forks of it, I'm ready to switch to ProcessWire. I'm handling the site-wide settings in a Fieldset-tab in home-page: Can I use the Fieldset name as API key? Because currently on my installation, the name of the fieldset is not accessible as WireData/array and returns null: $home = $pages->get('/'); echo $home->site_settings->site_title; // does not work, throws error because site_settings is null echo $home->site_title; // does work If configurable, I want the similiar API-behaviour of fieldset to access the child fields like with the repeater. Thanks for your support.
Zeka Posted May 23, 2019 Posted May 23, 2019 @rjgamer There is Fieldset (Page) that have desired API behavior ( it doesn't installed by default). You can read about it here. 1
LostKobrakai Posted May 23, 2019 Posted May 23, 2019 Fieldsets are only logical groups, but they don't change how data is stored/retrieved. Each field in a fieldset still is a direct child of the page and any nesting is only presentational. If you want nesting we have https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/#fieldset-page-fieldtypefieldsetpage. This is real nesting with another page behind the scenes, which does also allow things like reusing a field in the "fieldset" as well as in the parent page. 2
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