Forum for discussing general topics related to Couch.
14 posts Page 2 of 2
And here comes the next question. I would like to create a space, which is only displayed when the user entered data. I found the "not_empty" tag, which seems to be fitting my needs. The only problem: how do I make the editable field still visible in the Backend for the user to fill? Since it's empty from the start, it won't appear anyway.

Code: Select all
               
<cms:if "<cms:not_empty rechts_extrabox />" >
   <div class="box-grau">
      <cms:editable name='rechts_extrabox' label='Extrabox rechte Spalte' type='richtext' />
   </div>
</cms:if>


How would you do that with Couch?

Thanks again for your help and
warm regards,
mad
@madtrigger,

There are two ways of defining editable regions in Couch.
One is the way you are using (in place).
Another is defining the regions at one place keeping them within a cms:editable block.

You can switch to the second method.
Create a cms:template block somewhere at the top of the template (below the PHP include statement ofcourse) and define your region(s) within it e.g. as follows -
Code: Select all
<cms:template>
    <cms:editable name='rechts_extrabox' label='Extrabox rechte Spalte' type='richtext' />
</cms:template>

Now your code for displaying the contents would become -
Code: Select all
<cms:if "<cms:not_empty rechts_extrabox />" >
   <div class="box-grau">
      <cms:show rechts_extrabox />
   </div>
</cms:if>

Hope this helps.
It sure helped a lot - now I got it working. Thank you very much! I'm really starting to fall in love with this CMS :D
You are welcome :) I am glad you liked our little CMS.
14 posts Page 2 of 2
cron