Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I am trying to implement Couch CMS in my website. The case is as following:

1) Page1.php: This has three sections: header.php, content.php and footer.php. All these three files are called within Page1.php
2) The content.php section is editable and contains the news section. This is where Couch CMS needs to be implemented since the admin will be adding latest news every day/week/month etc.
3) I created a content_list.html in order to add data to content.php. However, the news item added gets displayed to content.php?p=1 instead of being displayed to page1.php?p=1

Any pointers on how I should go about? I have followed the blog.php tutorial and implemented using the same. However, I am getting no where. Please help!
Hello Sarah,

You mentioned
.. the news item added gets displayed to content.php?p=1

which suggests you have made the 'content.php' file a Couch managed template (by adding the <?php require_once( 'couch/cms.php' ); ?> and <?php COUCH::invoke(); ?> statements). Right?

I think you are getting a little confused because of Page1.php being composed of three included files.
See, once the header.php, content.php and footer.php files get included (or embedded using cms:embed) in page1.php, they become an integral part of the page1.php and cease to have a separate existence of their own (so to speak).

It might be the content.php part that requires editable capabilities, but content.php is part of page1.php so it is page1.php that should be made a Couch template.

Please add the <?php require_once( 'couch/cms.php' ); ?> and <?php COUCH::invoke(); ?> statements to page1.php. Define the editable regions in it within the cms:template block.

Now, supposing that you have defined a region named 'my_text', you can place the following statement
<cms:show my_text />
within content.php and it will show up on page1.php (because content.php gets included in it).

Hope I was able to explain things clearly enough.
Do let us know if you have any questions.

Thanks
2 posts Page 1 of 1
cron