Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi. I'm unable to access my globals.php variables in any other templates. I've downloaded and went through your Aurelius tutorial completely. And I can't reference global variables. The editable regions look good in the admin, i've even copied your exact tutorial code. If i can make global variables work we will probably move over about 30 sites to Couch. here is my code. Any help would be EXTREMELY HELPFUL.
globals.php code:

<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Global Settings' executable='0'>
<cms:editable name='site_name' label='Your Site\'s name' type='text'>Aurelius</cms:editable>

</cms:template>
<?php COUCH::invoke(); ?>

To reference the site_name my code on the blog.php template is as follows:

<cms:get_custom_field 'site_name' masterpage='globals.php' />

Please HELP!!!!!

Thanks so much!
Hi,

Did you access your globals.php as admin and did you changed your .htaccess file before trying to use the globals fields ?
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
Hi spooky,

I tested your code and it is working just fine for me.

Please check the following points to debug as to why it is not working on your system -
1. 'globals.php' template is indeed in the site's root (i.e. in the parent folder of 'couch') and not in any subfolder (which would change its name as used in the 'masterpage' parameter).
2. As @Tomarnst suggested, you have accessed the template as super-admin so as to register it (If you can see the template in the admin-panel it is registered).

While logged-in as super-admin, hover your mouse on the template's entry in sidebar of the admin-panel. The tooltip will show you the name of the template that should be used in the 'masterpage' template. Please confirm that it is showing 'globals.php'.

Do let us know how it goes.

Thanks.
3 posts Page 1 of 1