Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi KK and all,

After testing some of the features CouchCMS offers I must say it's exactly what I am looking for!
I am definitely going to buy the paid version within the next few days.

There's one thing I can't seem to achieve right now (which is a trivial task, I'm sure), and that's how to make a teaser image an editable region, to be able to change it at will.

I first tried it like I successfully did with my teaser title:
Code: Select all
<cms:editable name='teasertitel' type='richtext'>
<h2 class="teaser">Here goes the teaser title</h2>
</cms:editable>

but
Code: Select all
<cms:editable name='teaser_photo' label='Photo' desc='choose photo for teaser' type='image'>
<img src="<cms:show teaser_photo />" />
</cms:editable>


didn't work.

Neither did

Code: Select all
<div class="teaser">
<cms:editable name='teaser_photo' label='photo' desc='choose photo for teaser' type='image' />
<img src="<cms:show teaser_photo />" class="teaser-001" alt="here goes alt-text" />
</div>


With the last version, I get the image in the right place, but also the uploading URL above it.

I am sure the solution is so simple :oops:

I would be grateful for any pointers!

[Edited for typos]
Hi Solaris,

I am glad you liked Couch :)

Coming to your problem -
The second way you mentioned is the right way to use the image editable region.

To supress the output of the cms:editable tag itself either
1 , Add hidden='1' parameter to the tag's definition or
2. Shift the tag (i.e define the region) within cms:template tag pairs as shown in our tutorial for blog and portfolio sections.

Hope this helps
Thanks a lot for your quick answer, KK!
Glad my second solution wasn't that far off the target ;)

Tomorrow morning I'll try both solutions you mentioned.

I really like the look and feel of this CMS, as well as the possibility to keep things either quite simple or even tackle more complex solutions. You did some great work there, definitely!

At first I was a bit disappointed to suddenly find unwanted entities in my UTF-8 encodd pages and empty paragraphs in the source text, like
Code: Select all
<p> &nbsp; </p>

but after some googling found that only CKEditor is to blame, not CouchCMS.
After some changes to the editor's config.js, e.g.

Code: Select all
    config.enterMode = 2; 
    config.shiftEnterMode = 1;
    config.forceEnterMode = true;
    config.entities = false;


everything is fine now.

Thanks again!
Hi again, KK!

Your first suggestion ("Add hidden='1' parameter to the tag's definition") already did the trick for me, thanks a lot! I'll try the other suggestion later.

Code: Select all
<div class="teaser">
<cms:editable name='teaser_photo' label='photo' desc='choose photo for teaser' hidden='1' type='image' />
<img src="<cms:show teaser_photo />" class="teaser-001" alt="here goes alt-text" />
</div>

It's really a pleasure to work with this CMS :!:

The handling is very intuitive, and, in the meantime, I've also come to appreciate CKEditor and its GUI.
No more editor quirks here after adjusting the editor's config.js (see above).
No changes whatsoever to my clean code.

Thanks again! I'm looking forward to go on exploring this great tool.
4 posts Page 1 of 1
cron