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.
Nige
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.
Nige
I do something similar with backgrounds, something like this should work in you template header:
That's brilliant! thanks a lot :-)
you should actually do,
as if you are registered you don't necessarily have the edit bar
if (isset($cp)) { if ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage() || $cp->canApproveCollection()) { //stuff } }
as if you are registered you don't necessarily have the edit bar
instead of using isloggedin try using
if (isset($cp)) { if ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage() || $cp->canApproveCollection()) {
where you change these code?
I tried with my header.php,
but neither one of your codes work...
I tried with my header.php,
but neither one of your codes work...
You put the code in every theme page type: default, full, view etc.
Under CSS call and above
<?Loader::element('header_required'); ?>
<?php
$cp = new Permissions($c);
if($cp->canAdmin() && $cp->canAddSubContent()){
echo '<body style="background-position: 0 50px;" class="' . $c->getCollectionHandle() . '">';
} ?>
hope this helps
Under CSS call and above
<?Loader::element('header_required'); ?>
<?php
$cp = new Permissions($c);
if($cp->canAdmin() && $cp->canAddSubContent()){
echo '<body style="background-position: 0 50px;" class="' . $c->getCollectionHandle() . '">';
} ?>
hope this helps