Hi guys,
I'm learning couch and currently going through the Aurelius tutorial and in particular stuck on the creating a clone template.
I have placed the following code at the top of the blog.php document:
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Blog' clonable='1' commentable='1'>
<cms:editable name='blog_content' type='richtext' />
<cms:editable name='blog_image'
crop='1'
width='610'
height='150'
type='image'
/>
</cms:template>
I then placed the closing php tag at the end of the document, after the closing html tag:
<?php COUCH::invoke(); ?>
Then I placed the cms strings into the correct places within the body of the html as follows:
<!-- Post Title -->
<img class="thumb" src="<cms:show blog_image />" alt=""/>
<!-- Post Content -->
<cms:show blog_content />
<!-- Post Links -->
I've typed in some text to the blog_content richtext field in the admin panel and uploaded an image of the right size. I click 'save' then 'veiw' and the page displayed looks fine. However when I go to look at the actual page in the browser the edited data does not show. I'm pulling my hair out here since I just don't know what I'm doing wrong.
I've attached two screenshots; one is the preview I get when clicking 'view' in the admin panel after making my edits, the other is the actual blog.php page viewed in the browser, and you can clearly see the edited elements don't show in the latter.
I'd really appreciate some help here.
Thanks in advance
Marc
I'm learning couch and currently going through the Aurelius tutorial and in particular stuck on the creating a clone template.
I have placed the following code at the top of the blog.php document:
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Blog' clonable='1' commentable='1'>
<cms:editable name='blog_content' type='richtext' />
<cms:editable name='blog_image'
crop='1'
width='610'
height='150'
type='image'
/>
</cms:template>
I then placed the closing php tag at the end of the document, after the closing html tag:
<?php COUCH::invoke(); ?>
Then I placed the cms strings into the correct places within the body of the html as follows:
<!-- Post Title -->
<img class="thumb" src="<cms:show blog_image />" alt=""/>
<!-- Post Content -->
<cms:show blog_content />
<!-- Post Links -->
I've typed in some text to the blog_content richtext field in the admin panel and uploaded an image of the right size. I click 'save' then 'veiw' and the page displayed looks fine. However when I go to look at the actual page in the browser the edited data does not show. I'm pulling my hair out here since I just don't know what I'm doing wrong.
I've attached two screenshots; one is the preview I get when clicking 'view' in the admin panel after making my edits, the other is the actual blog.php page viewed in the browser, and you can clearly see the edited elements don't show in the latter.
I'd really appreciate some help here.
Thanks in advance
Marc