Jump to content

Variables $table $headers $rows


wegorz23

Recommended Posts

Posted

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

Posted

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?

Posted
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?

Posted
1 minute ago, wegorz23 said:

What do you mean by template?

templates.thumb.jpg.a9b776bf5b7c47c696f265038f64ae76.jpg

4 minutes ago, wegorz23 said:

I mean generally how to know what exactly $table or $headers methods do?

Variables not methods

 

{expression="var_export($table, true)"}
{expression="var_export($headers, true)"}
Posted

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).

Archived

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

  • Recently Browsing   0 members

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