Custom Block Edit mode problem
Permalink
Hello everyone.
I m currently building a custom block that allows users to insert product info (includes Product Name, Image and a Link to the detail page), then display the info using js slider.
I managed to allow users to add one block for each product, but problem is, when in edit mode, one block already takes up the whole display area(same width with the slider area),other newly added products are out of sight like what's shown in the picture attached.
So, what's the best solution for this?
Am thinking if i can change the block area size in edit mode? Or just simply let users to add all the product info in a single block entry, any example on this?
I m currently building a custom block that allows users to insert product info (includes Product Name, Image and a Link to the detail page), then display the info using js slider.
I managed to allow users to add one block for each product, but problem is, when in edit mode, one block already takes up the whole display area(same width with the slider area),other newly added products are out of sight like what's shown in the picture attached.
So, what's the best solution for this?
Am thinking if i can change the block area size in edit mode? Or just simply let users to add all the product info in a single block entry, any example on this?
Thanks for the reply!But it shows the same after i change the js part.
It turns out that i have to set each block's div float to left, then increase the width of the parent div to extremely wide when in edit mode, then the product will line up as shown in the attached pic!
It turns out that i have to set each block's div float to left, then increase the width of the parent div to extremely wide when in edit mode, then the product will line up as shown in the attached pic!
[code]
<?php if ($c->isEditMode()): ?>
<script type="text/javascript" src="<?php echo $this->getThemePath(); ?>/yourslideshow.js"></script>
<?php endif; ?>
Now when someone edits the page they won't see the slideshow at all but instead all of the blocks will stack on top of each other. This may be disorienting, but you'll just have to tell your users to expect this.