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

I am new to couch and while I am trying to modified my downloaded jquery image slider editable I am stuck!

All the images are editable inside my couch template and it's all good but when I view the page the source link appear as text on the top of the page.

This is the link
http://www.momozak.net/aurelius/basic_c ... &slider1=3

Can anyone please give me advice. I appreciate it.

Thanks
w
Hi Wallace,

Welcome to Couch.

Any editable tag, apart from, of course, creating an editable region, also outputs the content entered in that editable region.

For example, the following editable region serves to create an image input in the admin-panel and also outputs the path of the image entered into that input
<img src="<cms:editable name='my_image' type='image' />" />

In the example above, we are defining a region as well as outputting its content using a single statement.
We can, if we wish, separate the two functions. For example -
<cms:editable name='my_image' type='image' />
<img src="<cms:show 'my_image' />" />

Here we define the region in a separate statement and use its value (using cms:show) in a separate statement.

However, in the example above the first statement will still output the path of the image. This is what seems to be happenning in your case.

To suppress this unneeded output of the cms:editable tag we can either define all editable regions enclosed within the cms:template tag like this
<cms:template >
<cms:editable name='my_image' type='image' />
... other regions...
</cms:template>

or
add a hidden='1' parameter to the cms:editable tag like this
<cms:editable name='my_image' type='image' hidden='1' />

Hope this helps.
Hi kk,

first of all thanks for the advice, it worked with the 'hidden' value.

Since I like the small image thubnail visible without the output line
I tried the second method you recommended with </cms:template> enclosed.

but now the page is blank.

Can you pls advice further?

many thanks

w
Could you please paste in or attach the exact code that you are using?
Thanks.
This is only my trial page, pls bear with my silly naming of value.
Thanks

<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Photo_gallery_cms'>

....

<cms:editable
name='photo_1'
label='photo1'
desc='Upload first photo here'
crop='1'
width='800'
height='300'
group='group_img1'
type='image'

/>
<cms:editable
name='photo_1_small'
label='photo1'
desc='Upload first small photo here'
crop='1'
width='200'
height='60'
group='group_img1'
type='image'
/>
<cms:editable
name='photo_2'
label='photo2'
desc='Upload second photo here'
crop='1'
width='800'
height='300'
group='group_img1'
type='image'

/>
<cms:editable
name='photo_3'
label='photo3'
desc='Upload third photo here'
crop='1'
width='800'
height='300'
group='group_img1'
type='image'

/>

<body>
<div id="container100" align="center">
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>
<td>
<p>
<a class="fancybox" href="<cms:show name='photo_1'/>" data-fancybox-group="gallery" title=""><img src="<cms:show name='photo_1_small'/>" alt="" /></a>

<a class="fancybox" href="<cms:show name='photo_2'/>" data-fancybox-group="gallery" title=""><img src="../img/p3_s.jpg" alt="" /></a>

<a class="fancybox" href="../img/p4_b.jpg" data-fancybox-group="gallery" title=""><img src="../img/p4_s.jpg" alt="" /></a>
</p>
</td>
</tr>

</table>
</div>

</body>
</html>
</cms:template>
<?php COUCH::invoke(); ?>
Thanks.

Please move the end tag </cms:template> further up so as to place your page's HTML code out of it. Only the cms:editable tags are supposed to be placed within the cms:template tags.
Thanks for that KK.
It works now.
7 posts Page 1 of 1

Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 2 guests