gfdesign Posted June 25, 2013 Share Posted June 25, 2013 (edited) Hello again.I'd want to customize the admin for my client. My intention is to hide one panel for one specific user. Information related to users/roles I wouldn't want be visible, so... How should you do if I want to hide "Who can access this page?" panel in Setting page for one specific user? Should I do it through .css instead? This is the panel (red) I want to hide: Any clue will be welcome Ps: Sorry, the title should be "How to hide 'who can access this page?' section", but I didn't find how change it Edited June 25, 2013 by gfdesign Link to comment Share on other sites More sharing options...
ryan Posted June 27, 2013 Share Posted June 27, 2013 Given that this piece is informational only, and not tied to any user input, hiding it with CSS or JS seems adequate. This one may be tricky to target with CSS since it doesn't have a defined id attribute. But I think you could do it with: #ProcessPageEditSettings .InputfieldMarkup:first-child { display: none; } You can put this in your own css file in /site/templates/styles/admin.css. Then edit your /site/templates/admin.php and put this at the top (after the opening php tag): $config->styles->add($config->urls->templates . 'styles/admin.css'); 1 Link to comment Share on other sites More sharing options...
Soma Posted June 27, 2013 Share Posted June 27, 2013 A coincidence, hide it with a module http://processwire.com/talk/topic/3159-hide-settings-tab-in-page-edition/ 2 Link to comment Share on other sites More sharing options...
gfdesign Posted June 27, 2013 Author Share Posted June 27, 2013 Thanks for reply Ryan, but I'm afraid your solution could hide otherpanels due to the markup is similar in other panels (I guess I have seenthis markup in other panels).In the other hand, Soma's solution does exactly what I wanted.Many thanks to both. Link to comment Share on other sites More sharing options...
ryan Posted June 29, 2013 Share Posted June 29, 2013 Thanks for reply Ryan, but I'm afraid your solution could hide otherpanels due to the markup is similar in other panels (I guess I have seen this markup in other panels). This isn't correct, as the CSS selector is specific to focus on the panel you asked about. It's already targeting the settings tab, and the ":first-child" as part of your CSS selector focuses it on the "who can access" field. Without that, it would hide the "info" field as well. But I agree it's better to use Soma's solution as that removes it from the markup entirely. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now