Jump to content

Assigning module variables to a custom page


Moster

Recommended Posts

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,

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated