Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I have edited my Global Settings template what used to look like this:
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title="Global Settings" />
<!DOCTYPE HTML>
<html>
   <head>
      <title><cms:editable name='global_title' label='Meta Title' desc='Website Meta Title (SEO)' type='text' order='1'></cms:editable></title>
   </head>
...
</html>
<?php COUCH::invoke(); ?>


Now it looks like this:
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<!DOCTYPE HTML>
<html>
   <head>
      <title><cms:get_custom_field 'global_title' masterpage='globals.php' /></title>
   </head>
...
</html>
<?php COUCH::invoke(); ?>


Contents of globals.php:
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title='Global Settings' order='1' />
<cms:editable type='text' name='global_title' label='Title' />
<?php COUCH::invoke(); ?>


When logging into domain.com/admin I can see two templates both called Global Settings even though I have removed all the editable tags from the initial template. Hence in first Global Settings template, it says "No Editable Regions defined". Second Global Settings has all the correct content from globals.php.

So my question is, how to completely remove the first Global Settings template?
Physically delete it from disk. Couch will ask for complete removal afterwards.
What do you mean under "physically removing it from the disk"?
The template was only initialised as I have written in my initial post. There was no separate file with it.
how to completely remove the first Global Settings template?

What do you exactly mean by that?

From your description I understand that you have 2 physical php files - globals.php and some other 'global settings' php file (which content you have edited). Please help me understand what you have and what you need..
Sure.

Initially, there was no separate file created for the template. The template was defined inside index.php. I have removed all the references to the template defined inside index.php and created a separate file called globals.php. Now when I access admin panel I can still see two templates both called Global Settings. One template says "No editable fields defined" and another shows the contents of globals.php.

I think I have found a solution:
1. I have renamed index.php and opened up admin panel
2. Now I have got an option to remove the template with no editable fields defined
3. After removing the template in admin panel I have changed the name of index.php back to original

Thanks for your input @trendoman!
You are welcome.
Perhaps, you may find the newest 'Template globals' feature fit your use case - please see thread viewtopic.php?f=5&t=11105
6 posts Page 1 of 1