Can't hide block
Permalink Browser Info Environment
Just installed the plugin, made a background and now i can't hide the block itself.
If I use andvanced permissions- it hides the block and the background too.
If I use andvanced permissions- it hides the block and the background too.
Type: | Discussion |
---|---|
Status: | New |
The view for the block has an edit mode check to show something to click on in edit mode. If you changed something in the view, you will see this, at least, every time someone has complained about the block not hiding it's been this. My suggestion is to download a fresh copy of the block and not edit the view, see if that fixes your problem.
found a solution- I've put
opacity: 0.0; in block design, i can see the background and the block is hidden
opacity: 0.0; in block design, i can see the background and the block is hidden
That's nice, but the block by default hides itself when you leave edit mode. Did you edit the view to begin with, or is something else causing problems?
The code in /herent_backstretch/blocks/herent_backstretch/view.php should look like this:
If it looks like that, you should see the block in edit mode but not when the page is not in edit mode.
The code in /herent_backstretch/blocks/herent_backstretch/view.php should look like this:
<?php defined('C5_EXECUTE') or die("Access Denied."); $myJS = $controller->getJS(); print $myJS; $myPage = Page::getCurrentPage(); if ($myPage->isEditMode()){?> <div class="backstretch-block"> <h3><?php echo t('Backstretch Block');?></h3> <p><?php echo t('Refresh or publish the page to see changes.');?></p> </div> <?php } ?>
If it looks like that, you should see the block in edit mode but not when the page is not in edit mode.
no, didn't change the code, some plugins have little problems with Russian package of concrete.
View.php looks like
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$myJS = $controller->getJS();
print $myJS;
$myPage = Page::getCurrentPage();
if ($myPage->isEditMode()){?>
<div class="backstretch-block">
<h3><?php echo t('Backstretch Block');?></h3>
<p><?php echo t('Refresh or publish the page to see changes.');?></p>
</div>
<?php } ?>
View.php looks like
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$myJS = $controller->getJS();
print $myJS;
$myPage = Page::getCurrentPage();
if ($myPage->isEditMode()){?>
<div class="backstretch-block">
<h3><?php echo t('Backstretch Block');?></h3>
<p><?php echo t('Refresh or publish the page to see changes.');?></p>
</div>
<?php } ?>
Very weird, I don't know why that would work any different in the Russian version of concrete 5, Page::getCurrentPage() and $page->isEditMode() should both still be working. Unless there's something else that I'm missing, but I don't have a clue what that could be.
At any rate, glad you got it working...
At any rate, glad you got it working...
I'm having the same issue. It keeps showing:
Backstretch Block
Refresh or publish the page to see changes.
even when I logout.
Not sure what the problem is.
Backstretch Block
Refresh or publish the page to see changes.
even when I logout.
Not sure what the problem is.
Some pages have it, some don't.
I've tracked this down to the block cache - apparently it was pulling the cache instead of using the actual view of the block, the cache was set while in edit mode.
I've published an update to version 1.1 that should address this by no longer caching the block at all. Let me know if this doesn't work for you.
I've published an update to version 1.1 that should address this by no longer caching the block at all. Let me know if this doesn't work for you.
Thanks! Much appreciated!