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.

 
bvramlow replied on at Permalink Reply
So what exactly was your fix?

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 :)
mhawke replied on at Permalink Reply
mhawke
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?
bvramlow replied on at Permalink Reply
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.
JohntheFish replied on at Permalink Reply
JohntheFish
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.
bvramlow replied on at Permalink Reply
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.
bvramlow replied on at Permalink Reply
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?
bvramlow replied on at Permalink Reply
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); ?>
JohntheFish replied on at Permalink Reply
JohntheFish
If you wrap your code samples in:
[-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 :)