FrediKa Posted January 31, 2019 Share (edited) Hello, Looking the documentation, https://www.clicshopping.org/forum/topic/14-how-to-display-information-inside-the-template/ I would know if it's correct if I do that : Inside modules_front_page/template_html/ I modified this files template_bootstrap_column_5.php and I added echo $products_packaging . Is it correct ? Edited January 31, 2019 by FrediKa Quote Link to post
Julie Posted January 31, 2019 Share Hello @FrediKa, I think you have miss something when ou read the documentation : Quote if you need more informations, you must create a new template and use this syntax In this case, it's recommended to create a new template and to include your modification, but not inside the original template. I suppose this approach is made if there is an update about this template. Quote Link to post
Patrick Posted February 1, 2019 Share You have 2 choice 1 - Create a new template inside template_html directory and call after across the options 2 - Create a new products_new.php with your option and call your template if the first doesn't allow you to make what you want. Quote Link to post
FrediKa Posted February 2, 2019 Author Share Ok, I have changed inside template_bootstrap_column_5.php How to make another module with this own template ? Quote Link to post
ClicShopping Posted February 4, 2019 Share @FrediKa, There an example. the process: edit fp_new_products.php rename in fp_my_file.php Inside replace fp_new_product by fp_my_file replace : front_page_new_products by front_page_my_file replace : FRONT_PAGE_NEW_PRODUCTS by FRONT_PAGE_MY_FILE eventually you can change the template directory : '/template_html/' . MODULE_FRONT_PAGE_NEW_PRODUCTS_TEMPLATE by '/template_html/' . MODULE_FRONT_PAGE_MY_TEMPLATE_DIRECTORY Do not forget to change the language Do not forget to change the css Now you are ready to implement your code. This is a short cut to help you how to make a new template_html with a template directory but you can use also the default template_html Now do not forget to include your new contribution inside the Default template and also in your new template directory. Like that you can change everything without to change anything inside the default template directory. Why you must include your new contribution in the Default directory and not only the new template directory ? It's the DB initialization is made by default inside the Default directory. Like all the module are overridden in function the Default Directory, you have no choice to include the new element inside the Default directory. It's the limitation. I hope it's not little too complex, but after one or to test, you will understand the process. 3 Quote Link to post
Drack Posted February 4, 2019 Share Ok, Thank @ClicShopping fir this explanatio. I understand better why it's important to make another template directory. Sincerely, I does'nt make that on test site, I think I will try and take this orientation. Quote Link to post
Julie Posted February 4, 2019 Share Yes thank you @ClicShopping, I suppose if we can do that, it will better for the maintenance of the website. Is it exact ? Quote Link to post
ClicShopping Posted February 4, 2019 Share @Julie, yes exact, if there is a problem inside the Default template, you will have no problem in the future when you must update your website. Quote Link to post
FrediKa Posted February 4, 2019 Author Share Ok, it's a little complex for a newbie like me, I must practice a little. As you said, it's better to create another file and change why we need inside. Quote Link to post
Patrick Posted February 4, 2019 Share 3 minutes ago, FrediKa said: Ok, it's a little complex for a newbie like me, I must practice a little. As you said, it's better to create another file and change why we need inside. As I understand, yes it's better, and you reduce the maintenance. But I want to say, if there an upgrade, your file can be impacted if there is inside the core an evolution. But it's the same for all software. I suppose we will have a note if something happens to let the time to take this in consideration. Quote Link to post
FrediKa Posted February 14, 2019 Author Share I have a question about to create a new template ? I must copy every file or I can take just the files I need. I test just one or two files, it seems work. Tk Quote Link to post
Ronaldo Posted February 14, 2019 Share Hello, Looking a little the code after my first installation. I think you can choose only the files like you want to insert a new template. but about the css, you must copy all inside the new template. But like it's my first reaction, I forgot something. Maybe someone has more knowledge can write more about that. Quote Link to post
Patrick Posted February 15, 2019 Share @Ronaldo Yes, you have right, some files can be overridden inside a new template. But all the modules must be also in the default template because the system read in first the default template and install the element in the bd. 2 Quote Link to post
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.