Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi I may be totally off course here but for one particular client I am using couch and I'm looking to have a link www.domain.com/about-us/testimonials. With normal HTML I use to just place the html file in a new directory names about-us. Tried it on couch but it doesn't seem to like it. What's the easiest way to achieve this? I read something about nested pages, cloneable pages etc. But this particular page is completely different to the about us page? in terms of layout etc.
Hi,

There are no restrictions on the location of Couch managed templates.
If your existing HTML template happens to reside is in a sub-folder (or is several sub-folders deep), you'll just need to adjust the path leading to the 'couch' folder from it. I'll show you how -

For a template that resides in the site's root (e.g. http://yoursite.com/testimonials.php), you know we place the following as the first statement in it -
Code: Select all
<?php require_once('couch/cms.php'); ?>

If that template happens to be in a subfolder (e.g. http://yoursite.com/about-us/testimonials.php, the path will need to be adjusted to reflect this. It now becomes (notice the leading ../)-
Code: Select all
<?php require_once('../couch/cms.php'); ?>

Likewise if the template is nested two subfolders deep (e.g. http://yoursite.com/about-us/twitter/testimonials.php), the path now becomes -
Code: Select all
<?php require_once('../../couch/cms.php'); ?>

Does this help?
Sorry about the late reply... this worked great thank you :)
3 posts Page 1 of 1