I'm trying some stuff out with embedded pages on my website using CouchCMS to edit the pages.
But I'm a little stuck...

I'm using 3 basic PHP files (header.php, footer.php and main.php)
Through index.php I include all 3 files.
In the header.php i use:
Code: Select all
require_once( 'couch/cms.php' );


In the footer:
Code: Select all
<?php COUCH::invoke(); ?>


in the main.php I use switch - case to get my pages loaded in the main site and added some code above it that I found on this Forum.:
Code: Select all
<cms:template title='index'>
<cms:editable name='page1' type='richtext' />      
<cms:editable name='page2' type='richtext' />
</cms:template>
<?php
switch ($_POST['view']) {
case ("page 1"):
         
   echo "<cms:embed 'page1.inc' />";
         
break;
         
case ("page2"):
         
   echo "<cms:embed 'page2.inc' />";
         
break;
}
?>


Now when I try to edit the pages through the admin page of CouchCMS all fields stay empty. I'm sure there is content on the page, because I can see the content in my pages when I browse them.

The page1.inc and page2.inc only contains basic HTML and no CouchCMS tags.

I'm probably missing something, but can't seem to find what...

Any help is apreciated.