Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Create link to different table 24 Jul 2014 23:07 #12535

  • arnar
  • arnar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 1
Hi,

Is it possible to create a link to different table.

For example I have Tables A and B. Table B contains a link to A. (b.aid = a.id)

Now in a gridview for Table B i want to get all instances of B that refer to that particular A.

Can anyone help me with that ?

regards
Arnar

Please Log in or Create an account to join the conversation.

Create link to different table 26 Jul 2014 10:50 #12536

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Use a simple filter.

On the table B, create a compo filter based on A (FK). Drag a sub field of the FK node. (To display text values in the combo)
Then, you can call this page in various ways.

- The user set the filter value
- The link of the page specify it (...&filter_myfk=33)
- The menu item set it automatically (In the menu item setup)
- a small PHP code filter the model : $model->setState('filter.myfilter', 33)

There are many ways...
Also you can group the grid B depending of the FK value
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.053 seconds

Hi All just wanted to add one more "thank you" voice to all those who discovered the value of this amazing application. The website I was working on went to production few days ago and I do not want to even try to imagine what would it take to build it without j-cook. So - endless thanks keep it running and evolving I believe it deserves to be the core tool for any joomla application! Thanks!
Michael (bmk028 - Forum)  

Get Started