Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to copy template?
#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


Messages In This Thread
How to copy template? - by dazz13 - 2013-08-18, 11:16:16
RE: How to copy template? - by shawn_a - 2013-08-18, 12:58:12
RE: How to copy template? - by dazz13 - 2013-08-18, 14:10:57
RE: How to copy template? - by Connie - 2013-08-18, 17:20:59
RE: How to copy template? - by dazz13 - 2013-08-18, 23:35:22
RE: How to copy template? - by Carlos - 2013-08-18, 17:14:15
RE: How to copy template? - by shawn_a - 2013-08-18, 23:37:22



Users browsing this thread: 2 Guest(s)