Autonav disappears during edit
Permalink
When I go to edit my pages the autonav disappears. The <ul> tags are still there in the html, but the menu is invisible.
But the menu only disappears when I go to edit, otherwise its fine.
Any ideas?
Found solution: Apparently, in editing mode, C5 adds extra div wrappers, so the prob was in my own css that set visibility to hidden for any divs inside the navigation div, which rendered the nav hidden in editing mode and visible normally.
But the menu only disappears when I go to edit, otherwise its fine.
Any ideas?
Found solution: Apparently, in editing mode, C5 adds extra div wrappers, so the prob was in my own css that set visibility to hidden for any divs inside the navigation div, which rendered the nav hidden in editing mode and visible normally.
The original question was posted on Aug, 2009. I wouldn't expect an reply any time soon ;-)
Are you able to describe what's happening to you in more detail?
Are you able to describe what's happening to you in more detail?
I'm using isotopehttp://isotope.metafizzy.co/
It hides/filters certain items by class name.
When I go into edit mode, C5 creates a div around each block item. The block that is created does not have the class name which would otherwise make it visible.
So my isotope items are being filtered out in edit mode. I am not sure how to override, or add a class to the edit mode div.
I'm not a big fan of changing core C5 files because of future upgrade issues but will if necessary.
It hides/filters certain items by class name.
When I go into edit mode, C5 creates a div around each block item. The block that is created does not have the class name which would otherwise make it visible.
So my isotope items are being filtered out in edit mode. I am not sure how to override, or add a class to the edit mode div.
I'm not a big fan of changing core C5 files because of future upgrade issues but will if necessary.
The cleanest solution would be to test for edit mode and not setup isotope when in edit mode. If isotope is only set up during view, then it cant argue with edit.
Many blocks with complex view behaviours do such, either showing just a a placeholder or a script-free representation during edit mode.
Many blocks with complex view behaviours do such, either showing just a a placeholder or a script-free representation during edit mode.
That is a great solution.
But in my case isotope needs to be running even in edit mode as the isotope items are the web "pages".
I may just have to edit isotope.
But in my case isotope needs to be running even in edit mode as the isotope items are the web "pages".
I may just have to edit isotope.
What I'm attempting to do is add a class to the div C5 creates when in edit mode with this code.
if ($c->isEditMode()) { ?> <script> alert('hello world'); $('.ccm-area').addClass('item-thumbs'); </script> <?php } ?>
___________________
the alert works fine when in edit mode. But the jquery does not. Jquery is not being initialized twice as I have seen that as a common issue with C5.
Stumped gents... it would help to know when the edit divs are created. Would it help if this script was in the header,footer?
if ($c->isEditMode()) { ?> <script> alert('hello world'); $('.ccm-area').addClass('item-thumbs'); </script> <?php } ?>
___________________
the alert works fine when in edit mode. But the jquery does not. Jquery is not being initialized twice as I have seen that as a common issue with C5.
Stumped gents... it would help to know when the edit divs are created. Would it help if this script was in the header,footer?
Found a method... not the cleanest but this is for future reference in case anyone decides to try this on their projects.
add this to the inside of the C5 area
if (Page::getCurrentPage()->isEditMode()): ?> <li class="item-thumbs span3 specials editMode"><?php $ab->display($c); ?></li> <?php endif;
____________________
Block looks like this and works in edit mode. Items are not as WYSIWYG as I would like them to be, but at least it works.
<?php $ab = new Area('Main Content'); if (Page::getCurrentPage()->isEditMode()): ?> <li class="item-thumbs span3 specials editMode"><?php $ab->display($c); ?></li> <?php endif; $ab->setBlockWrapperStart('<li class="span3 specials item-thumbs">'); $ab->setBlockWrapperEnd('</li>'); $ab->display($c); ?>
add this to the inside of the C5 area
if (Page::getCurrentPage()->isEditMode()): ?> <li class="item-thumbs span3 specials editMode"><?php $ab->display($c); ?></li> <?php endif;
____________________
Block looks like this and works in edit mode. Items are not as WYSIWYG as I would like them to be, but at least it works.
<?php $ab = new Area('Main Content'); if (Page::getCurrentPage()->isEditMode()): ?> <li class="item-thumbs span3 specials editMode"><?php $ab->display($c); ?></li> <?php endif; $ab->setBlockWrapperStart('<li class="span3 specials item-thumbs">'); $ab->setBlockWrapperEnd('</li>'); $ab->display($c); ?>
If you wrap your code samples in:
[-code-]
// with the hyphens removed
[-/code-]
They will be nicely formatted as per:
EDIT: typos - took a few tries to get that right :)
[-code-]
// with the hyphens removed
[-/code-]
They will be nicely formatted as per:
// with the hyphens removed
EDIT: typos - took a few tries to get that right :)
Did you change the css when in edit mode?
Did you override your css manually?
I am drawing a blank on what to do here. Glad to see that someone else has had this issue though. Gives me hope :)