Blesta Addons Posted August 31, 2018 Report Posted August 31, 2018 in every release blesta update some files that are used in templates. and this can lead as to every time update the template folder with a cloned files from bootsrap folder, like the blesta-X.X.0 and some template files, we prefer if blesta make at least blesta-X.X.X loaded from another placement that is not related to a custom folder created by user, why not create a new vendor folder called javascript and put in it all the core javascript files . also it would be nice to update the view in case of a pdt file is not exist in the custom template try to load it from the boostrap folder, this way if a custom file exist use it, if not load the default one (same approuch for a lot of CMS like wordpres, e107 ... ect ) , with this tip developper will concentrate only in a part that will be changed based in their design and is easy to make a revision in case for new release . a sample tip by updating the view Class if (!file_exists($file)) { // Use default template file in case the file not exist in the custom template folder $file = $this->container->get('minphp.constants')['ROOTWEBDIR'] . $this->view_path . 'views' . DIRECTORY_SEPARATOR . 'client' . DIRECTORY_SEPARATOR . 'bootstrap' . DIRECTORY_SEPARATOR . $this->file . $this->view_ext; } elseif (!file_exists($file)) { throw new Exception(sprintf('Files does not exist: %s', $file)); } in my template folder i have only about 3 changed core files, all others are fetched from the bootstrap folder . Quote
Tyson Posted September 5, 2018 Report Posted September 5, 2018 I'm not sure what you mean by this: On 8/31/2018 at 8:22 AM, Blesta Addons said: ...we prefer if blesta make at least blesta-X.X.X loaded from another placement that is not related to a custom folder created by user... As for the idea of falling back to the default template if a file is unavailable, that may be something we could support in the future. Quote
Blesta Addons Posted September 6, 2018 Author Report Posted September 6, 2018 9 hours ago, Tyson said: As for the idea of falling back to the default template if a file is unavailable, that may be something we could support in the future. That is another solution. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.