Avo::PanelComponent | Avo docs
# avo-2
n
πŸ‘‹ Are there any good examples to put a table in a panel component without writing custom html? https://docs.avohq.io/2.0/native-components/avo-panel-component.html#bare_content
l
what kind of table? what will it display?
n
It will display resource from another model
l
hmm, I don't knwo exactly what you mean. an example would be great.
you could try and load it using a turbo_frame
that should work
<turbo-frame id="frame_id" src="/admin/resources/teams?turbo_frame=frame_id" target="_top" class="block"></turbo-frame>
of course you'll have to compose the URL yourself
ensure the frame id matches the
?turbo_frame=
param
n
Hi πŸ‘‹
Thank you so much for the reply!
I meant I want to put a grid block there https://docs.avohq.io/2.0/grid-view.html
Maybe panel component isn’t the right thing to use for my case.
We are a podcast hosting app, and user has many podcasts, and podcast has many episodes.
And I would like to have a page to list all the podcasts under the user
And list all the episodes for each podcast
All on the same page
l
ok, so you need the
belongs_to
field
a good way to start understanding Avo is to watch my video from the homepage https://avohq.io/
next, please take an hour and skim throught the docs. you don't have to memorize everything, but to get a sense of what the framework can do https://docs.avohq.io
n

https://cdn.discordapp.com/attachments/1126323431999287336/1126929069066432545/image0.jpgβ–Ύ

This is what I’m trying to get
I think I can use user has_many episodes through podcast to create a table view that includes all episodes under the same user
But i am not sure how to implement the above illustration.
l
If you want that exact structure where you get a list of the podcasts and then a list of each ones on the same page, you might need a custom tool where you render the podcast information by hand and then you can render the episodes using turbo frames
I’ll try to create a demo on Tuesday
n
Thank you!
Hi πŸ‘‹ Adrian,
πŸ™ Any luck on the demo?
l
hey man
gimme a few minutes
n
Hi πŸ‘‹
l
I\ll have something in 10-15 minutes
n
Thank you!
l
see the last commit
it's not the prettiest code, but you should get the idea
you can make that controller and route more resourcefull
n
Thank you!
l
anytime!
sorry for the long wait
n
Don’t worry about it! And thank you so much for putting up an example!