Skip to content

Commit

Permalink
Title_2_id.js now used in Staticpage editor if editing new cloned page.
Browse files Browse the repository at this point in the history
  • Loading branch information
eSilverStrike committed Jan 4, 2017
1 parent 25cadfe commit eca724d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public_html/admin/plugins/staticpages/index.php
Expand Up @@ -137,7 +137,8 @@ function staticpageeditor_form($A)
}

// Add JavaScript
if ($_CONF['titletoid'] && empty($sp_id)) {
// Only use title_2_id if enabled, new staticpage or clone (basically any staticpage that does not exist yet) - $mode = 'edit', 'clone'
if ($_CONF['titletoid'] && (empty($sp_id) || $mode == 'clone')) {
$_SCRIPTS->setJavaScriptFile('title_2_id', '/javascript/title_2_id.js');
$sp_template->set_var('titletoid', true);
}
Expand Down

0 comments on commit eca724d

Please sign in to comment.