IfisEdit Mode for visibility...
Permalink 1 user found helpful
Hi, I have a complicated front page of a site that the client would like to make more editable. It has js pop ups on bio photos over a glowing js star. (tell me about it!)www.candylane.co.nz
I think I can handle making the bio photos etc editable by putting them in editable areas (rather than hard coded) but the js pop up on rollover contains the teachers name.
If the client wants to replace or remove a teacher (and they do) they will need to able to alter these js popup details.
At the moment the pop ups are in a div with visibility:hidden. Is it possible to set that to visibility:visible BUT only for edit mode?
Nige
I think I can handle making the bio photos etc editable by putting them in editable areas (rather than hard coded) but the js pop up on rollover contains the teachers name.
If the client wants to replace or remove a teacher (and they do) they will need to able to alter these js popup details.
At the moment the pop ups are in a div with visibility:hidden. Is it possible to set that to visibility:visible BUT only for edit mode?
Nige
yeah. I usually check for edit mode in the <body> and add a class if it is. something like and the do something like
Thank you.
Just one question about that syntax?
In your example does the body tag need to be closed? I'm struggling to get it to work...
Nige
In your example does the body tag need to be closed? I'm struggling to get it to work...
Nige
yeah, it does, sorry. I've updated it now.
oh right just like that. I did that and thought, that doesn't look right, so cheers I'll give it a go...
Excellent thats working thanks a lot.
How about this one? Can I turn off js in editmode?
Nige
How about this one? Can I turn off js in editmode?
Nige
custom or core? core would be a pain in the ass, custom not so much
Custom, its an attached js script called thus:
Nige
<script type="text/javascript" src="<?php echo $this -> getThemePath (); ?>/homeTest.js"></script>
Nige
just do
<?php if (!$c->isEditMode()) {?> //load js here <?php}?>
Cool but won't that turn it ON in Edit Mode?
Nige
Nige
not if you use the ! negative declaration.
Ahhhh brilliant, that explains a lot (and in the past)
Cheers for all your help mate.
Nige
Cheers for all your help mate.
Nige