Closed ghost closed 5 years ago
@bnomei commented on Jul 27, 2018, 5:32 AM UTC:
(removed my post since i missunderstood question) XD
@bnomei commented on Jul 27, 2018, 7:47 PM UTC:
not totally unrelated to DRY is total length of config files. splitting them based on plugin etc. but rejoice – for which there is a solution:
@omz13 commented on Sep 1, 2018, 6:27 PM UTC:
FWIW, in the latest release of my xmlsitemap I implemented a single-level pseudo-namespace. The readme gives an example. The more interesting bit of code is below. With some recursion it could probably be extended to support multiple levels of namespace.
i just ran into this inconsistency again but the other way around – trying to write core options like plugin options. it would be nice if both ways would work. it boils down to just imploding recursively with a .
, right?
https://getkirby.com/docs/reference/system/options/session
<?php
return [
'session.cookieName' => 'kirby_session', // will fail since using plugin syntax
'session' => [ // will work for since its not a plugin
'cookieName' => 'kirby_session',
]
];
i just ran into this inconsistency again but the other way around – trying to write core options like plugin options. it would be nice if both ways would work. it boils down to just imploding recursively with a .
, right?
https://getkirby.com/docs/reference/system/options/session
<?php
return [
'session.cookieName' => 'kirby_session', // will fail since using plugin syntax
'session' => [ // will work for since its not a plugin
'cookieName' => 'kirby_session',
]
];
This is now solved!
@jenstornell commented on Jul 27, 2018, 4:46 AM UTC:
In the options in
config/config.php
, currently what we do is this:It works fine, but I'm very tempted to instead write something like this:
The big difference is that the last version is DRY. If the namespace or the plugin name is changed, I can just change it in one place.
Also plugins with the same author will be nicely grouped together when they use the same namespace.
This issue was moved by bastianallgeier from k-next/kirby#761.