Edit Bar covering top part of site

Permalink 1 user found helpful
Sorry about this but I did a search on this and found a bit of code for a background image that didn't work for me.

My edit bar is covering the top part of my website and I can only move it down by applying margin to the wrapper.

This is fine but I don't necessarily want that much margin.

Is there an 'isEdit' type option for moving the site down a bit when you are logged in but doesn't affect the site in ordinary viewing mode? I seem to remember a post by Remo somewhere ages ago about this but I can't find it.


View Replies: View Best Answer
hbartlett replied on at Permalink Best Answer Reply
I do something similar with backgrounds, something like this should work in you template header:

<?php global $u; if ($u->isLoggedIn()) {  ?>
<style type="text/css">
#wrapper { margin-top: 49px; }
<?php  } ?>
nige replied on at Permalink Reply
That's brilliant! thanks a lot :-)
Mnkras replied on at Permalink Reply
you should actually do,
if (isset($cp)) {
   if ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage() || $cp->canApproveCollection()) {

as if you are registered you don't necessarily have the edit bar
Mnkras replied on at Permalink Reply
instead of using isloggedin try using

if (isset($cp)) {
   if ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage() || $cp->canApproveCollection()) {
mkharisecario replied on at Permalink Reply
where you change these code?
I tried with my header.php,
but neither one of your codes work...
Steevb replied on at Permalink Reply
You put the code in every theme page type: default, full, view etc.
Under CSS call and above
<?Loader::element('header_required'); ?>

$cp = new Permissions($c);
if($cp->canAdmin() && $cp->canAddSubContent()){
echo '<body style="background-position: 0 50px;" class="' . $c->getCollectionHandle() . '">';
} ?>

hope this helps