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

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started