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

I have worked my way through the tutorial and am now trying to integrate Couch into an en existing site....in a sub folder of that site as I am sure to make mistakes along the way.

So I have declared my about page a template and am adding editable regions. I am trying to make the mission statement editable for the user but if i wrap the whole div#mission_statement in editable tags the rollover button (download the brochure) disappears and if I put the editable tags inside the div#mission statement I get that div doubled up on inside the other which throws the layout off.

www.tirc.ie/couch_cms_test/about.php

What do you do?
Hi,

Can you send me the original HTML for the page without any editable regions added?
Or better still host the original HTML page on your server and send me the link.

Thanks
Hi the original file (and site) is at www.tirc.ie/about.html
Hi,

Your original HTML code for the mission statement block is this -
Code: Select all
<div id="mission">

<h2 class="stand_out">Here at <abbr title="Tralee International Resource Centre">TIRC</abbr> we have a vision...</h2>

<span class="equality_ribbon"></span>

<p>
&#8220; To support integration between local and international communities in Tralee by providing a drop-in facility and services through interagency cooperation &#8221;
<br />
&#8212; Our Mission Statement<br />
<a class="right" href="pdf/tirc_flyer_Nov2010.pdf" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('brochure','','images/download_brochure_down.png',1)"><img src="images/download_brochure.png" alt="download our brochure" name="brochure" width="175" height="35" border="0" id="brochure" /></a>
</p>

</div>
<!-- END #mission -->

There are many elements in this block but I am sure the only one that you'd wish to be editable by your client would be the "To support integration between local and international communities in Tralee by providing a drop-in facility and services through interagency cooperation" part.

You can use an editable region of type 'textarea' for this (not 'richtext' because the editor will enclose the input within <p> tags of its own that might not go well with the existing markup) because the client only needs to input simple text - the formatting is already done by the HTML markup.

The markup with Couch tags now becomes -
Code: Select all
<div id="mission">

<h2 class="stand_out">Here at <abbr title="Tralee International Resource Centre">TIRC</abbr> we have a vision...</h2>

<span class="equality_ribbon"></span>

<p>
&#8220; <cms:editable name='mission_statement' >To support integration between local and international communities in Tralee by providing a drop-in facility and services through interagency cooperation</cms:editable> &#8221;
<br />
&#8212; Our Mission Statement<br />
<a class="right" href="pdf/tirc_flyer_Nov2010.pdf" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('brochure','','images/download_brochure_down.png',1)"><img src="images/download_brochure.png" alt="download our brochure" name="brochure" width="175" height="35" border="0" id="brochure" /></a>
</p>

</div>
<!-- END #mission -->

Notice we have excluded the buttons with the swappable images, the quotation marks (&#8220; , &#8221;) and even the <br/> tag from being included in the editable region.

Instead of making a big region with multiple elements editable, it is always preferable to make multiple smaller discrete regions editable. This way we can be assured of never having the client break the layout by inadvertently editing out any element.

Hope this helps. Do let me know.

Thanks.
4 posts Page 1 of 1