Moster Posted July 24, 2020 Share Posted July 24, 2020 Hello, If I want to view the full list of template variables, I need to add {debug} on the page you want to customize. The template variable are assigned based on the page you're in.. Example: I'm on clientareahome.tpl and I want to retrieve a module variable like $vps.ram from /modules/servers/moduleX/template/producthomepage/index.tpl The list of vps variables are on that page only. How to register additional variables to clienthomepage? Kindest Regards, Moster, 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 24, 2020 Share Posted July 24, 2020 5 hours ago, Moster said: If I want to view the full list of template variables, I need to add {debug} on the page you want to customize. it wouldn't be the full list of available variables, but that's not relevant to this.. 5 hours ago, Moster said: How to register additional variables to clienthomepage? usual modules only return variables on a specific page - you wouldn't want all modules returning all variables on all pages as it would be a nightmare! if the module wasn't encoded, you might be able to change it's coding... but are these values that you are trying to pull from a module template page, stored in the database somewhere ?? if so, then there's your answer - just write a hook to query those specific values and return them to your specific template... that hook could be clientareahomepage if you're returning HTML in a specific spot; clientareapagehome if you're returning variables, or even clientarehomepagepanels if the output is going to be shown in a panel. 0 Quote Link to comment Share on other sites More sharing options...
Moster Posted July 25, 2020 Author Share Posted July 25, 2020 15 hours ago, brian! said: if the module wasn't encoded, you might be able to change it's coding. It is encoded, but I have access to the source code, what is the good starting point of changing the code. 15 hours ago, brian! said: but are these values that you are trying to pull from a module template page, stored in the database somewhere ?? It's not, this approach is a little bit more advanced, these variables are pulled from external API server based on the vps.id assigned to it. I could tweak the results but not on any other pages except the index.tpl page of module itself. 0 Quote Link to comment Share on other sites More sharing options...
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.