This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Discussions » A Tree-based eZ Platform Configuration?
expandshrink

Friday 18 March 2016 12:16:47 pm - 4 replies

» Read full blog post

Introduction

While I was fiddling with SiteAccess configuration for a new bundle, I thought of an alternate organization that may simplify things. In eZ Publish legacy, the settings folder followed a directory-based structure convention. Override levels (siteaccess, global, etc.) were materialized as directories, and configuration namespaces (content, site, file) as filenames. It turns out that we could easily implement the kind of tree-based configuration with eZ Platform.

Friday 18 March 2016 6:39:20 pm

In variant B the repositories.yml and siteaccess.yml would be directly under ezpublish and not ezpublish/system if I'm not mistaken.

I would like to see siteacces.yml handled a bit differently.  I would like to be able to merge all configs under say ezpublish/siteaccess into one.
For example:
ezpublish/siteaccess/sitea.yml
ezpublish/siteaccess/siteb.yml

then in sitea.yml

list:
   - sitea
groups:
   - site_group_common
       - sitea
match:
   ......

then in siteb.yml

list:
   - siteb
groups:
   - site_group_common
       - siteb
match:
   ......

 

They then would merge and the final config would be:
 list:
   - sitea
   - siteb
groups:
   - site_group_common
      - sitea
      - siteb
match:
   ......
This may be too much magic and introduce some quirks but it's an additional idea to throw in.

Saturday 19 March 2016 2:53:15 pm

You're right about the structure, wizhippo. I'll fix the screenshot. Gotta admit that it is a fake tree that I created for this post. I'll update it happy.gif Emoticon

What you're describing sounds like special handling of siteaccess configuration, right ? It is true that being able to configure each siteaccess in its own directory would be convenient. I think it would be pretty easy to derive that from what I have described. I'm not sure how the settings would be merged, but files named like a siteaccess directory could be handled as siteaccess configuration for the ezpublish extension.

Maybe you could try to draft it out based on one of my branches ?

Saturday 19 March 2016 5:36:17 pm

I think what I may try is something like this.
ezpublish\
  siteaccess.d\
    site1.yml
    site2.yml
  siteaccess.yml
  repositories\
    default.yml
  system\
    default\
      content_view.yml

Any file in a .d directory uses the directory as the key instead of the filename.  This way you can support both merging multiple files under one key automatically and/or single file if you wish.

Thoughts?

Saturday 19 March 2016 6:57:41 pm

Seems to be working to support .d dirs.  https://github.com/wizhippo/ezplatform/tree/ezplatform_config_tree_v3

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from