Edit Mode problem
PermalinkThis is the way the published page looks:http://imgur.com/niTVo.jpg
This is the way the page looks in edit mode:http://imgur.com/1f1GZ.jpg
I want the edit mode page to look like the published page - with each "Painting" item sitting up against the last, not in its own row.
I've tried so many things. Add Layout mode does something odd to the "Painting" items:http://imgur.com/Sgs3K.jpg - and anyway this adds one extra layer of confusion for the client (having to select Add Layout, specify styles, then add to each one)...
I've tried this:
<?php if ($c->isEditMode()) { ?> <div style="height: 335px; width: 165px; float: left;"> <?php } ?> <?php $a = new Area('Grid Item 1'); $a->display($c); ?> <?php if ($c->isEditMode()) { ?> </div> <?php } ?>
...with many different variations of CSS, positions, spans.
I tried a few other tweaks, such as changing the ccm.ui.css (in /concrete/css/), but it of course affected every editing pane, which isn't what I wanted.
Is there a way to force only the "Paintings" items to sit side by side?
Thanks for any guidance...
...and also because of the extra step that would be necessary on the client's behalf, to add additional rows.
I was hoping that there would be a tidier solution to making the "Painting" items sit float:left (or the equivalent of float:left) in the editing pane.
Of course, there is always a tables-based solution of some sort.
-Steve
Field 1: Image from library
Field 2: Description of painting
Field 3: Absolute URL of where whole item area will link
Correct about client being able to add as many such blocks as they want, appearing in a grid both out and in edit mode.
I'm still trying a few variations of tweaking the CSS and CSS for edit mode. Will post back here if I succeed, but sadly I've been tackling this on and off for weeks with no success.
Do you have Firebug installed (a Firefox plugin)? If so, can you play around with the styles of that dotted red line div when in edit mode? Perhaps it has "display: block" set or something like that? If you identify what the offending CSS rule is, I think you can just override it in your theme's stylesheet. Or you could override it inline in the template itself.
I used the code I posted in the original post (the isEditMode code) to set the editing style to display:block, float:left, etc., but nothing worked.
Right now I'm trying to do a custom css file for the block itself with !important, but it's not staying exclusive to the block's css, it's affecting all pages.
Does anyone know how to create css that will affect ONLY the block itself?
> affect ONLY the block itself?
Sounds like a higher degree of specificity is needed with your CSS selectors.
-Steve
-Steve
Did you sort out your problem?
I can see a couple of ways around the issue.
Don't use tables, use CSS.
Add images in a content block one after another(with a non-breaking space).
Try the builtin slideshow with links.
Place your content within an HTML block.
Try one of the free gallery add-ons.
There are other ways also.......
header.php:
<head> ... <?php Loader::element('header_required'); ?> <?php if ($c->isEditMode()): ?> <style type="text/css"> div.ccm-block-arrange, div.ccm-block { /* border set to 0, use outline instead */ border: 0; margin: 0 0 4px; outline: 2px dotted #FF0000; overflow: hidden; padding: 0; } </style> <?php endif; ?>
It's unclear to me if you are using a layout or abandoned it for a different approach. Is this a one-off unique page or something you want to be able to repeat elsewhere on the site?
-Steve