Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hello

I have an php file that I invoke but I do include external php file for menu that I want to control
in couchcms so I want my index to be Home from cms and do another invoke for this include file
so I can separate it from page

in cms

Home - index.php <-- menu are include()
Menu - menu.php

it is possible to do this ?


thanks
Thanks

does't seem to support php script file.. and how to make greeting.inc appear in cms like a new page ?
It supports filenames with any extentions. For php content, it is strongly advisable to change <?php stuff to <cms:php> as in http://docs.couchcms.com/tags-reference/php.html

Second question is not clear to me, i'm sorry.
You can include php files in Couch templates in several different ways. You can use raw php.
Code: Select all
<?php include('menu.php'); ?>

You can put raw code inside of a cms:php tag.
Code: Select all
<cms:php>include('menu.php');</cms:php>

You can totally couchify it by placing menu.php in the snippets folder and using the cms:embed tag.
Code: Select all
<cms:embed 'menu.php' />

The snippets folder is protected by .htaccess. So menu.php can't be opened directly using the last method. Hope that helps to clarify your choices. :)
5 posts Page 1 of 1
cron