Jump to content

Variables $table $headers $rows


wegorz23

Recommended Posts

Greetings,

anyone of you knows how to acces those variables in IPS? I would like to see methods and attributes of those objects, I need that to change the functionality of Club Enhancements widget to automatically get user into the first topic if there is only one that exists in topics list, Thank you. 

image.thumb.png.30fb2a60b0bb23aa25a86a61a582f7f1.png

Link to comment
Share on other sites

Hello,

2 hours ago, wegorz23 said:

anyone of you knows how to acces those variables in IPS?

Nohow if you don't have them in the template.

These variables are not global.

2 hours ago, wegorz23 said:

to change the functionality of Club Enhancements widget

Why you don't ask creator?

Link to comment
Share on other sites

On 8/1/2019 at 1:55 PM, newbie LAC said:

Hello,

Nohow if you don't have them in the template.

These variables are not global.

Why you don't ask creator?

What do you mean by template? Template.php? Actually this club thing I mentioned was not neccessary. I mean generally how to know what exactly $table or $headers methods do? How do get into them?

Link to comment
Share on other sites

If you look at the top of the template file in your screenshot, you should see the following:

<ips:template parameters="$table, $headers, $rows, $quickSearch" />

(or similar - I'm not 100% sure which template file you are editing)

These variables are being passed in by the backend PHP code. You can inspect them as newbie LAC shows above by using var_export(). The values are going to be defined in the table helper's __toString() method (e.g. system/Helpers/Table/Table.php).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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