Reputation: 25999
I'm a bit new to drupal and even newer to views and had two views questions.
Is it possible to show multiple views on a page? Say I have a stock website, Can I show a view of the income statement AND a view of the balance sheet on the same page?(both outputted as a table).
And secondly, If it is possible to have multiple views, can I hide/show the views within the page? I saw it while reading a django book but here's a example. I am working on putting alot of information and I'm thinking of using this technique to make it more easy for users to access the info.
Any guidance or tips would be most appreciated.
Thanks,
Upvotes: 0
Views: 353
Reputation: 211
You can use views_embed_view() function in views PHP field to get the values of another view in current view.
Upvotes: 0
Reputation: 2149
Yes and yes. For showing more than one view on a page, you can either execute and render the view in code, or you can use an attachment view through the GUI. Make one view a 'page' type, and any others you want to display on that page 'attachments' that you add to it. Or you could make multiple views 'blocks' and output them as you wish.
To make things hide and show, use drupal_add_js() for whatever javascript you want.
Upvotes: 2