Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to copy template?
#1
Is there a way to copy a template file or other template include file? Or create a new blank template file? Am I missing something? If not, this is a serious lack and this thread should then be in the feature request section. Or is there a plugin for this? Thanks
Reply
#2
Only via FTP or host access.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Why? There are many use cases.

(2013-08-18, 12:58:12)shawn_a Wrote: Only via FTP or host access.
Reply
#4
The current setup seems to be fine for most site developers. However it would be nice to have a plugin (could be named "Advanced Theme Editor") that lets you create, copy, delete, rename templates and js files, etc.
Reply
#5
I assume that it is better to edit a new template file offline. I suggest to test changes like that in a local installation on a local server (XAMPP for example) and upload the tested version on the host ;=)

If you want to use a complete copy of the theme:
copy the complete folder, rename the folder and upload it to your themes folder.
You should modify the header of the template-files


Code:
/****************************************************
* @File:         template.php
* @Package:    GetSimple
* @Action:        Innovation theme for the GetSimple 3.2.2. / for get-simple.de

*****************************************************/
in this example the @Action is changed to show that it is a modified version for the german website

it makes sense to add another template to the existing active theme.
In that case you can either download the template.php, modify it, rename it, modify the header and uploat it to the original folder

if you have no active FTP, you can, at least, take the content of the template-file: open it in the the theme editor, copy the complete content into a local file and modify, but you will need FTP to upload the new version to the online-theme-folder

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#6
Suppose you need to change a theme file. You want to try it out first before going 'live'. This is analogous to wanting to copy a page and make changes before going live with the changes. There's no way to do this outside of ftp. I think a plugin could be made which makes a complete copy of page including the template.

Suppose the template were

Code:
<?php
  include('template1.header.inc.php');
  get_page_contents();
  include('template1.footer.inc.php');
?>

The plugin would create a new template file with

Code:
<?php
  include('template1.header.copy1.inc.php');
  get_page_contents();
  include('template1.footer.copy1.inc.php');
?>

and copy template1.footer.inc.php to template1.footer.copy1.inc.php etc. and copy the page and set the page to the new template. Then you could edit the template include files and test out the changes without doing all that copying yourself via ftp. Not all people who use backends are tech savvy. Some have never even used ftp. GetSimple should strive to be self-sufficient and not rely on ftp once the initial templates have been set up. Along these lines there should be a way to copy and create new template files and template inc files, and rename, and delete them.

(2013-08-18, 17:20:59)Connie Wrote: I assume that it is better to edit a new template file offline. I suggest to test changes like that in a local installation on a local server (XAMPP for example) and upload the tested version on the host ;=)

If you want to use a complete copy of the theme:
copy the complete folder, rename the folder and upload it to your themes folder.
You should modify the header of the template-files


Code:
/****************************************************
* @File:         template.php
* @Package:    GetSimple
* @Action:        Innovation theme for the GetSimple 3.2.2. / for get-simple.de

*****************************************************/
in this example the @Action is changed to show that it is a modified version for the german website

it makes sense to add another template to the existing active theme.
In that case you can either download the template.php, modify it, rename it, modify the header and uploat it to the original folder

if you have no active FTP, you can, at least, take the content of the template-file: open it in the the theme editor, copy the complete content into a local file and modify, but you will need FTP to upload the new version to the online-theme-folder

Cheers, Connie
Reply
#7
Well gs was never really intended to be an authoring tool for themes.
But I can see the need to clone or create new,

There is issue already in github for this feature. Just not sure where to put it on the roadmap.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)