S.A Posted April 4, 2021 Share Posted April 4, 2021 Hello.. I have a.tpl and b.tpl all these files contains different forms. I want call files and show these files in c.tpl. How I can do it? Link to comment Share on other sites More sharing options...
Razi Posted April 5, 2021 Share Posted April 5, 2021 Hello, in this case you can use this method for include any other file in current tpl Example: {include file='catalog/_partials/products-top.tpl' listing=$listing} Link to comment Share on other sites More sharing options...
S.A Posted April 5, 2021 Author Share Posted April 5, 2021 4 hours ago, Razi said: Hello, in this case you can use this method for include any other file in current tpl Example: {include file='catalog/_partials/products-top.tpl' listing=$listing} Thank you for your reply structure of my project: -mymodule -view -templates -hook - a.tpl when I call file must become like this ? {include file='templates/hook/a.tpl' listing=$listing} , Also what mean of this (listing=$listing) Thank you Link to comment Share on other sites More sharing options...
Razi Posted April 5, 2021 Share Posted April 5, 2021 in this example listing is the variable which you can use in your second tpl file. and for include file you must need to use ../ for one step back in folder {include file=".../../templates/hook/a.tpl"} Link to comment Share on other sites More sharing options...
S.A Posted April 5, 2021 Author Share Posted April 5, 2021 8 minutes ago, Razi said: in this example listing is the variable which you can use in your second tpl file. and for include file you must need to use ../ for one step back in folder {include file=".../../templates/hook/a.tpl"} Does not work.. Error: Unfortunately, there is no payment method available. Link to comment Share on other sites More sharing options...
LazyCircles Posted February 1, 2022 Share Posted February 1, 2022 Hello, Came across the same issue, the solution I've found was include "module:" before the address. (In case you are dealing with a module, if not there should be another method like this one). Here's my example: {include file='module:mymodule/views/templates/front/upperfooter.tpl'} Regards, 1 Link to comment Share on other sites More sharing options...
SmartDataSoft Posted February 2, 2022 Share Posted February 2, 2022 @S.A You need to know if the value inside the template file is globally accessible in that case new error will occur , is this static tpl file. For all of we need to understand from which location you try to include the template file of the module from another module or from theme file Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now