Detect if header is loaded
Permalink 2 users found helpful
Hey, is there a way to detect if the header bar is loaded? i know there is the is logged in check, and the is in edit mode check, but i don't see a way to detect if the bar is loaded.
any hints?
Mike
any hints?
Mike
There's not a specific function for that. The edit bar is loaded in /concrete/elements/page_controls_header.php using the following check:
alright, I guess that works, would be nice if there was a build in function for it
*pokes core team*
Thanks
*pokes core team*
Thanks
Hi!
It would be cool if following would be possible Andrew.
AutoIndent for this forum..just an idea I just had.. who knows maybe someone is doing that for the codeHighlighter block..
It would be cool if following would be possible Andrew.
<?php $level = (int)User::getCollectionAdminLevel(); if(User::isLoggedIn() && $level === 3 ) { /** Load when user AccessLevel Grants * access to the EditBar, where 3 is * just an imaginary example number. */ }
AutoIndent for this forum..just an idea I just had.. who knows maybe someone is doing that for the codeHighlighter block..
I need some help on this. This if statement doesn't seem to do it for me.
I am trying to load a CSS file in a theme via an external link. Here is my code:
I've been in contact with Mnkras about this because this is a theme I'm trying to submit to the market place. This code is being included in the theme's page via a PHP include (though it doesn't work either if I put it in directly).
I can see this is copied from the core itself, but I can't get anything within the if statement to execute, though print statements outside of it show up fine.
I am trying to load a CSS file in a theme via an external link. Here is my code:
I've been in contact with Mnkras about this because this is a theme I'm trying to submit to the market place. This code is being included in the theme's page via a PHP include (though it doesn't work either if I put it in directly).
I can see this is copied from the core itself, but I can't get anything within the if statement to execute, though print statements outside of it show up fine.
try:
global $c;
$cp = new Permissions($c);
before it
global $c;
$cp = new Permissions($c);
before it
That did it, thank you!