mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
17 lines
No EOL
536 B
JavaScript
17 lines
No EOL
536 B
JavaScript
Meteor.startup(function () {
|
|
var prefix = Telescope.config.customPrefix;
|
|
|
|
// loop over templates and see if they're a custom template replacement
|
|
Template.forEach(function (template) {
|
|
|
|
var templateName = template.viewName.replace("Template.", "");
|
|
|
|
// if template name starts with "custom_" (or another predefined prefix), make the replacement
|
|
if (templateName.slice(0,prefix.length) === prefix) {
|
|
|
|
var oldTemplate = templateName.slice(prefix.length);
|
|
template.replaces(oldTemplate);
|
|
|
|
}
|
|
});
|
|
}); |