mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
21 lines
No EOL
655 B
JavaScript
21 lines
No EOL
655 B
JavaScript
Meteor.startup(function () {
|
|
// var prefix = Telescope.config.customPrefix;
|
|
|
|
// loop over custom prefixes
|
|
Telescope.config.customPrefixes.forEach(function (prefix) {
|
|
|
|
// 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);
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
}); |