How to link to a subtable


#1

Hi,

I’m trying to create a data table widget with a column in each row being clickable, which then expands into a subtable.

I’ve tried to glean how to do it from looking at the code for the Search Terms widget, but can’t decipher how it’s done.

I can’t find anything in the documentation either, that explains how to create these kinds of widgets.

Can anyone explain how I can do this please i.e. how to tell Piwik which column should link to the subtable and that the subtable should be expanded when a row in that column is clicked?

Debbie


(Matthieu Aubry) #2

Hi Debbie

Unfortunately we don’t yet have documentation for this particular use case. Please see here for more info about the docs we are writing: Provide useful Plugin Developer Documentation · Issue #4122 · matomo-org/matomo · GitHub


#3

Hi Matt,

Yes, I know, but only after a lot of searching. :wink:

In the absence of documentation, could you tell me how to do it?

Debbie


#4

Hi All,

Oh dear, I’m still stuck on this problem, so does anyone know how to do the following:

  • How to trigger Piwik to make a row clickable.
  • How to get the key of the parent row passed through to the child table’s widget, so it can retrieve the correct set of data.

I’ve got as far as adding the child retrieval method as the fourth parm of the view->init method, but that doesn’t seem to work on it’s own, so there must be something else that needs to be done to end up with a clickable row, but even after lots of following the execution paths in a debugger, I still haven’t been able to discover what else Piwik needs.

Does anyone know how to get this working?

Debbie