2015-06-17 09:15:26 +09:00
|
|
|
Meteor.startup(function () {
|
2015-08-20 11:49:00 +09:00
|
|
|
|
2015-08-03 15:42:28 +09:00
|
|
|
// loop over custom prefixes
|
|
|
|
Telescope.config.customPrefixes.forEach(function (prefix) {
|
2015-06-17 09:15:26 +09:00
|
|
|
|
2015-08-03 15:42:28 +09:00
|
|
|
// for each prefix, loop over all templates to find any replacements
|
|
|
|
Template.forEach(function (template) {
|
|
|
|
|
|
|
|
var templateName = template.viewName.replace("Template.", "");
|
|
|
|
|
|
|
|
// if current template name starts with the prefix, find original template and replace it
|
|
|
|
if (templateName.slice(0,prefix.length) === prefix) {
|
|
|
|
var oldTemplate = templateName.slice(prefix.length);
|
|
|
|
template.replaces(oldTemplate);
|
|
|
|
}
|
2015-06-17 09:15:26 +09:00
|
|
|
|
2015-08-03 15:42:28 +09:00
|
|
|
});
|
2015-06-17 09:15:26 +09:00
|
|
|
|
|
|
|
});
|
2015-10-05 23:15:26 +01:00
|
|
|
});
|