Welcome, Guest
Username: Password: Remember me

TOPIC: Best way to add a collection to item brick

Best way to add a collection to item brick 11 Oct 2017 13:34 #15363

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
Hi

I'm building a component, that in simple terms as an example has 2 tables: "users" and "users items". "users items" are connected to "users" through a FK.

On my user item page, I have created a new tabbed brick, where I would like to display "users items".

What would be the best way to achieve this?
Thanks :-)
Last Edit: 11 Oct 2017 13:34 by dyvel.
The administrator has disabled public write access.

Best way to add a collection to item brick 11 Oct 2017 20:16 #15366

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
- put the item form in as a brick, and in the options set "tab it"
- put the item fly in as a brick, and in the options set "tab it"
- fork the views/users/tmpl/item.fly.php
- in there, load the items as a grid

Something like that
The administrator has disabled public write access.

Best way to add a collection to item brick 12 Oct 2017 07:50 #15368

  • dyvel
  • dyvel's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 11
  • Karma: 10
Hi Romkabouter

I've already created my tabbed view (form and fly pages). I've dragged my pivot table to the fly page, and expanded the relation in my model ormLayout... So I see the relevant data in my object on the fly page now.
But is this the way to do it - the best way?
The administrator has disabled public write access.

Best way to add a collection to item brick 12 Oct 2017 08:19 #15369

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
I think the best way is when you keep the forking to a minimum, so probably yes :)
The administrator has disabled public write access.
Time to create page: 0.094 seconds

Get Started