Skip to content

Instantly share code, notes, and snippets.

@low
Created July 20, 2010 09:59
Show Gist options
  • Save low/482757 to your computer and use it in GitHub Desktop.
Save low/482757 to your computer and use it in GitHub Desktop.
<?php
/**
* Create files for all templates (EE1)
* Add this to a script somewhere
*/
include PATH_CP.'cp.templates.php';
$CPTMPL = new Templates;
$query = $DB->query("SELECT g.group_name AS template_group, t.template_id, t.template_name, t.template_data FROM exp_template_groups g, exp_templates t WHERE g.group_id = t.group_id");
foreach ($query->result AS $row)
{
$CPTMPL->update_template_file($row);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment