Google Groups

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


Hamish Friedlander Aug 9, 2012 2:31 PM
Posted in group: SilverStripe Core Development
I definitely think the manner of adding CSS by using require_css in _config.php is a hack, and we need to provide a better way of adding css to the admin area.

But the general idea of controlling appearance in the admin area via CSS instead of via configuration values is sound, and the method I prefer.

Icons sit right on the boundary of what's content versus what's appearance, so I'm happy either way. I still think CSS is slightly tidier (you can deal with different sized images, different images in different places, etc) but I'm OK if someone raises a patch that adds a config value. I think if we start adding config values for font sizes etc though we've gone to far.

Hamish Friedlander

On 10 August 2012 07:55, 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.