Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » The Required Stylesheets, SilverStripeNavigator Specifically

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 665 Views
  • juneallison
    Avatar
    Community Member
    108 Posts

    The Required Stylesheets, SilverStripeNavigator Specifically Link to this post

    Hi,

    So I understand that there are a few required stylesheets that get inserted at the bottom of the header. I understand the importance of these. Once you login into the admin the SilverStripeNavigator stylesheet is also added to this group.

    Is it possible for this stylesheet to be added to beginning of the head area as opposed to the end? It is overriding some of my other style sheets. Keeping the website styles in tact is more important to me than the styles of the navigator.

    I know my other options are to 1) remove the navigator all together 2) examine the CSS and resolve any conflicts.

    Any input would be great.

    Thanks!

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: The Required Stylesheets, SilverStripeNavigator Specifically Link to this post

    The stylesheets are included in the order that they are requested, and duplicate inclusions are ignored, so one way of doing this is to force the navigator stylesheet to be included before anything else. Page_Controller::init() would work.

    Put this into your Page_Controller::init():

    if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
    Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css');
    }

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: The Required Stylesheets, SilverStripeNavigator Specifically Link to this post

    I find it a little surprising that the navigator CSS conflicts with your CSS, though, because all of its rules start with #SilverStripeNavigator, #SilverStripeNavigatorMessage, or #SilverStripeNavigatorLinkPopup.

    We've tried to make SilverStripeNavigator.css "safe", and if it's not, we should probably fix that.

    What is the nature of the conflict?

    665 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.