Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
I'm building a little site to allow the clergy in my church to edit the service booklets. Up to now we have held them as LibreOffice documents and shared those on DropBox, but I want to move us into the E-Book age and support PDF, Website, epub, and mobi, but use the website HTML as the common source - Couch is ideal, but.....

Lot's of our books look like this:

Code: Select all
Priest:  Something the priest says which can go on a bit, tra la la,
         Something the priest says which can go on a
         bit, tra la la.
Choir:   Something the choir sings which can go on a
         bit, tra la la,Something the priest says which can go on
         a bit, tra la la,Something the priest says which can go on a bit,

Now normally in HTML, I'd use a definition list for this. But the CKEditor doesn't do Definition Lists. Of course one can add them in Source view, but my clerical friends are not up to that!!

Using css to model hanging indents also works:
Code: Select all
    padding-left: 100px;
    text-indent: -60px;

but then I have trouble aligning as the speaker bit is variable length.

Is there any other approach that might work? Or is there any way on integrating a different editor, one that does support DL DT DD?

TOF
Hi,

How about using repeatable-regions for this?
Input only the raw data into it and generate the DL DT DD markup in code by looping through the rows.

Do you think it could work?
That will lead me to learning what repeatable-regions are :)
Probably tomorrow!
But thanks for the quick reply.
TOF
KK, this works quite well, but it is missing one essential ingredient: Add a row between two existing ones. Without this it isn't usable, as the only way to add a row is to delete all the following ones, and re-enter everything.

This is my template, is there anything I missed?:
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Service1' clonable='1'>
  <cms:repeatable name = 'Prayers' >
    <cms:editable type = 'text' label = 'Speaker' name = 'speaker' />
    <cms:editable type = 'nicedit' label = 'Prayer' name = 'prayer' />
  </cms:repeatable>
</cms:template>
<cms:if k_is_page >
<!DOCTYPE html>
<html>
<head>
  <title><cms:show k_page_title /></title>
  <link rel="stylesheet" type="text/css" href="mainstyle.css" media="all">
</head>
<body>
    <div id="header">
        <h1>Service: <cms:show k_page_title /></h1>
    </div>
   
    <div id="content">
        <dl>
          <cms:show_repeatable 'Prayers' >
          <dt> <cms:show speaker /> </dt>
          <dd> <cms:show prayer /> </dd>
          </cms:show_repeatable>
        </dl>
    </div>
       
    <div id="footer">
        <p>Copyright © Richard Downing and the Parish of St Bega, St Mungo, and St Herbert, Keswick.</p>
    </div>
</body>
</html>
<cms:else />
  <cms:embed 'service1_list.html' />
</cms:if>
<?php COUCH::invoke(); ?>



TOF.
Add a row between two existing ones

Rows of repeatable regions support drag-n-drop reordering.
Please try grabbing a row by the dotted handle on the left edge and re-positioning it.
It might take a little effort getting used to it but it works.

Please let me know if this completes the requirement.
Awesome! Thanks. That seems like a way forward, I'll show it to the clergy and see if they think they can work with it.

TOF.
6 posts Page 1 of 1