Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi,

This is my first post and just started using couch and so far seems like an amazing product! After going through the docs and searching, I haven't been able to find out how to do this or if it's possible.

Basically looking to be able to inline edit an image on a repeatable block. It seems to work for inline editing text, but not images.

My Repeatable:
Code: Select all
<cms:repeatable name="about_block" label="Abous Us Blocks" group="about_section" order="3">
<cms:editable type="image" name="about_block_image" label="Block Image" desc="" width="175" show_preview="1" preview_width="100" group="about_section" order="1" />
<cms:editable type="text" name="about_block_headline" label="Block Headline" desc="" group="about_section" order="2">Headline</cms:editable>
<cms:editable type="text" name="about_block_text" label="Block Text" desc="" group="about_section" order="3">some text</cms:editable>
</cms:repeatable>


and then in my markup:
Code: Select all
<cms:show_repeatable 'about_block'>
    <div class="col-sm-4 p-b-md">
      <img src="<cms:show about_block_image />"/>
      <cms:popup_edit "about_block_image" />
      <h4 <cms:inline_edit 'about_block_headline' />><cms:show about_block_headline /></h4>
      <p <cms:inline_edit 'about_block_text' />><cms:show about_block_text /></p>
    </div>
  </cms:show_repeatable>


Editing the text works, but if I try to edit the image, I get "Field not found: about_block_image" error.

Thanks!
Hello and welcome!

Repeatable Region is a 'compound' field i.e. consists of possibly many other child fields and rows, so it is not possible to edit child fields separately yet. I am sure even inline editing of text fields doesn't work (=not saving) contrary to your report. What you can do is edit RR as a whole. The following should work our of the box -
Code: Select all
<cms:show_repeatable 'about_block'>
    <div class="col-sm-4 p-b-md">
      <img src="<cms:show about_block_image />"/>


      <h4><cms:show about_block_headline /></h4>
      <p><cms:show about_block_text /></p>
    </div>
</cms:show_repeatable>

<cms:popup_edit fields="about_block" />


"No save confirmation" issue: - image replacing works just like in admin panel. If enormous image is submitted, then script can "whiteout" due to insufficient server memory whlie resizing images, cropping etc. Just like in admin panel itself, no surprise here. If anything goes wrong and popup does not respond, then simply reload main page and try again with less monstruos image.
trendoman wrote: Hello and welcome!

Repeatable Region is a 'compound' field i.e. consists of possibly many other child fields and rows, so it is not possible to edit child fields separately yet. I am sure even inline editing of text fields doesn't work (=not saving) contrary to your report. What you can do is edit RR as a whole. The following should work our of the box -
Code: Select all
<cms:show_repeatable 'about_block'>
    <div class="col-sm-4 p-b-md">
      <img src="<cms:show about_block_image />"/>


      <h4><cms:show about_block_headline /></h4>
      <p><cms:show about_block_text /></p>
    </div>
</cms:show_repeatable>

<cms:popup_edit fields="about_block" />


"No save confirmation" issue: - image replacing works just like in admin panel. If enormous image is submitted, then script can "whiteout" due to insufficient server memory whlie resizing images, cropping etc. Just like in admin panel itself, no surprise here. If anything goes wrong and popup does not respond, then simply reload main page and try again with less monstruos image.


Thank you, yeah you're right, looks like it wasn't originally saving the in line text like I thought it was. The popup edit seems to work. Is there anything you would suggest to format the popup better?

Image

Seems like it could get a bit messy on smaller screens. Maybe it's possible to link to the admin / that specific group / block to edit?

Thanks again!
Sure, you can tweak col_width and input_width parameters for the repeatable region, but best is to use stacked_layout = '1', as described in Couch 2.1 release notes viewtopic.php?f=5&t=11105. Also, you can output an 'edit' link - <cms:admin_link/> which will bring admin to the exact page in admin panel to edit. Inline is great for a quick change here and there, but anything more complex is better handled via admin panel.
trendoman wrote: Sure, you can tweak col_width and input_width parameters for the repeatable region, but best is to use stacked_layout = '1', as described in Couch 2.1 release notes viewtopic.php?f=5&t=11105. Also, you can output an 'edit' link - <cms:admin_link/> which will bring admin to the exact page in admin panel to edit. Inline is great for a quick change here and there, but anything more complex is better handled via admin panel.


Ah didn't see the stacked_layout parameter, much cleaner looking now! Thank you so much!
5 posts Page 1 of 1