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

TOPIC:

Newbie - combining results from two tables in view 09 Jul 2017 23:11 #15246

Okay, so I am probably being a bit stupid but I am trying to work out how to do the following with your system - need to know how to do this/that I can do this before forking out the cash!!!

I have a simple component with 2 tables - projects and images.

The images table has a collection of images which are linked again specific projects. An image will only ever be linked to one project.

I want to create a view for a project that includes all of the linked images

How can I do that?

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

Newbie - combining results from two tables in view 10 Jul 2017 15:43 #15247

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
You need to use the relations.

Open your "Project" layout (item or list)
Browse the fields tree and look at the last node of your fields, it should be a Cross-Reference (XREF) towards "Images". You get it ?
Open this XREF Node, and choose the value to show. Drag and drop into a list/fly, or form, and you are done.

You created a N:1 relation.
Simple as that. But I know the docs are still missing...
Coding is now a piece of cake

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

Newbie - combining results from two tables in view 10 Jul 2017 15:55 #15248

Thank you, that makes sense, but it isn't producing what I am looking for (although that is going to me!)
I have several images associated with a project, but it is not showing them.
How do I tell it to loop through all of the images?

Thanks

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

Newbie - combining results from two tables in view 17 Jul 2017 21:36 #15249

worked it out - all workign now.

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

Last edit: by Jonhubbard. Reason: marked as complete
  • Page:
  • 1
Time to create page: 0.057 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started