Problems, need help? Have a tip or advice? Post it here.
14 posts Page 1 of 2
I am currently setting up CouchCMS in an existing website.

And currently its built up with subfolders, so it looks like:
index.php
behandlingar.php
-ansiktskurer.php
-massage.php
konferens.php
-mat.php
-pool.php

etc etc

Setting up the pages within the main area (index, behandlingar, konferens etc.) works excellent, but when I want to connect one of the subpages it appears like if couch CMS can't find the cms.php.

Does anyone have any ideas on how to solve this? I am gratefull to everything that might help me.

Thanks!

edit:

This is how the page turns out when accessing it:
http://sandvikgard.com/behandlingar/ansiktskurer.php
The path to 'cms.php' provided in the 'require_once' statement needs to be adjusted for templates in sub-folders. For example, the following path is ok for templates that are in the root
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>

But for templates in a sub-folder the path should now be made -
Code: Select all
<?php require_once( '../couch/cms.php' ); ?>

where '..' means "go up one level from the current subfolder (i.e. land into the root) and there you'll find a folder named 'couch' with a file named 'cms.php'".)

Similarly for a template that is in a folder within another folder, the path now becomes
Code: Select all
<?php require_once( '../../couch/cms.php' ); ?>

which translated in human-speak means - "go up one level from the current subfolder (to land in the parent folder), then go up one more level (to land in root) and there you'll find a folder named 'couch' with a file named 'cms.php'".

Hope this helps.
Thanks! It works perfect! Now I'm off to buy a license for the website :-)
can't we call the master page parameters other than keeping in snippets folder? I Installed couch in root folder I have a page in subfolder NEWS and I tried this code

<cms:pages masterpage='../works.php' start_on="<cms:date format='Y-m-d H:i:s' />" show_future_entries='1' orderby='publish_date' order='asc'> but no results ..
The '../works.php' is not a valid name for a masterpage (please don't confuse the name with the path).

The name of a template is how it appears in the admin-panel's sidebar. If you have used the 'title' attribute to show something else there just hover your mouse over it and the name will appear in a popup.
I dint get you.. yes I have used title attribute for template and when I mouse hover on it the page is works.php itslef.. I also used it for other pages in snippets but when trying to keep in subfolder page its' not working
It's difficult to understand the situation. More clarity would be helpful. If works.php is inside of a folder 'NEWS', then you should be using this for the 'pages' tag:
Code: Select all
masterpage='NEWS/works.php'
No works.php is actually in root folder but i have a page actors-list.php in subfolder. I want to get list from works.php ... is it possible without keeping actors-list.php in snippets folder or root folder.. and also my couch folder is in root folder
my doubt is how to establish path for Subfolder pages .. is it possible to directly call the template?
You can show pages belonging to any template in any template you want.
The key is the 'masterpage' parameter that you supply to cms:pages tag.

In your case simply use 'works.php' as the name. There is no need to 'establish path' etc. Even if the calling template is within a sub-folder just use the name 'works.php'.

I think you are getting confused by the fact that for templates in sub-folders the
<?php require_once( 'couch/cms.php' ); ?>
needs to be adjusted. That is a PHP thing. In Couch, just use the template name.

Thanks
sorry to raise this question again .. I understand what you have said .. I got the point and the diff. btw path and name clearly..but my doubt is .. I have installed couch in root folder and works.php template is in root directory itself.. And i have lists.php in a sub-folder and it is not a couch template.. It's a simple already existing page..the page is having good PR, if i apply couch to the page the url is turning something like this subfolder/lists/ i dont want this to take place..n also i dont want the page to be appear in couch admin [not mandatory but it will help me using couch in applying to many existing pages easily]

I want the subfolder/lists.php to remain same but want to call the pages from works.php, is it possible ?.. I tried just like u said.. without establishing path..I just try calling using 'masterpage=works.php' but nothing is working.. hope u understand the situation clearly
14 posts Page 1 of 2