Google Groups

Re: [silverstripe-dev] Re: CMS Menu Icons


Hamish Friedlander Aug 9, 2012 2:33 PM
Posted in group: SilverStripe Core Development
You can override _any_ static with a yml config value as long as the static is accessed via Object->stat (or better yet Config::inst()->get) and not directly via ClassName::$static.

Statics still have a place in the configuration system - they're the way you set default values for config properties.

And yes Ingo, I know this all still isn't documented.

Hamish Friedlander

On 10 August 2012 09:30, Aaron Carlino <aaronc...@gmail.com> wrote:
Yes! I love the idea of using config. But maybe for consistency, move $menu_title and $url_segment there, too?




On Aug 9, 2012, at 3:55 PM, Ingo Schommer <in...@silverstripe.com> wrote:

Hm, Aaron you might be right, given how often those icons would be customized, particularly for new ModelAdmins.
I stand by my comment about avoiding to clutter PHP with UI aspects too much, though.
The YML config layer sounds like a better place for this. Not as obvious,
but that's more a matter of documentation (e.g. in the existing ModelAdmin docs).

On 9/08/2012, at 8:41 PM, Uncle Cheese <aaronc...@gmail.com> wrote:

Do I understand correctly that we're going do document Martimiz's solution as the endorsed method for adding a custom icon to your LeftAndMain interface? Maybe it's just me, but something isn't right about that. At worst it looks like a hack, and at best it's a desperate workaround.

I understand the point about not cluttering up our classes with statics, but you've already provided the API for $menu_title and even $url_segment. Why stop there?

I don't know.. that just looks bad to me. If I were shopping around for a CMS and came across that documentation, I'd be a bit nonplussed.




On Wednesday, August 8, 2012 11:53:15 AM UTC-4, Martimiz wrote:

No, I won't :-) I just want to look if there are any other nice things that can be done using styling, besides changing the icon

Yep, pull request for 3.0, please :) Just to be clear: Don't extend that "cms tree" howto, that's a different topic.


I've sent a pull request (https://github.com/silverstripe/sapphire/pull/712) that solves the issue of the icon not being updated in the DetailForm. I haven't found any glitches, but please check it out. And a ticket #7756 (http://open.silverstripe.org/ticket/7756) I now realize I should have named the pull request after the ticket, sorry, so much to think about for a simple minotpatch :-)
 

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/cdWLSP6PVbwJ.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.