Hi Drupaleros,
I'm intending building a Taxonony structure so:
Continent
-Asia
-India
-Species
-cats
-dogs
-Pakistan
-Species
-cats
-dogs
-Europe
-France
-Species
-cats
-dogs
Anyhows, stage one: create a view showing countries grouped by continent and give it a menu path, easy! as is creating a view of animals grouped by species.
How do you create a link between the 2 views? eg when a user selects India for example how to get view 1 to tell view 2 to list the species?
Also, assuming this can be done, when the user eventually arrive at Continent -Asia -India -Species -cats this page would be a page with all post from that taxonomy term, em, er, eh, can I change that to say a Group node for Organic groups?
Comments
you can do it by: - adding to
you can do it by:
- adding to views a customfield module
http://drupal.org/project/views_customfield
where you can add php code
- create this field and add there php code to print out the view manualy:
views_embed_view($viewName, $display_id, $myNodes);
more on:
http://thedrupalblog.com/embedding-view-drupal-6-using-views-embed-view
i dont understand you second question...
Many thanks..
..for your reply. I will check out the resources you suggest. I've only just got my head around views accepting arguments and was unsure how how to proceed with a view providing an argument, looks like your suggestions indicate this is possible (oh joy! goodbye weekend..;-))
As far as the second question goes, I just realised that when a user selects Continent -Asia -India -Species -cats he will arrive at a node and that node can be of any content type I wish, in my case I want it to be an Organic group node. So I guess I've just answered that question myself, that is unless I'm wrong again ;-) !
Again, thanks for your help, using the search just left me more confused.
Cheers!
Could you please...
..clarify what you mean by:
- create this field and add there php code to print out the view manualy:
views_embed_view($viewName, $display_id, $myNodes); ?
I presume this code should go in the first view customfield?
- you create a view with
- you create a view with species which takes an argument, continent, check it if it works properly
- create a view with continents where you add custom field, and print out your view with species
Nearly there:
- you create a view with species which takes an argument, continent, check it if it works properly
Check!
- create a view with continents where you add custom field, and print out your view with species
Hmm, how do I create the arguments for the customfield?
and I presume I'll have to get an
<a hrefin there too, to create a link.hmmm could you explain more
hmmm could you explain more what are you trying to achieve?
do you list it in lets say left panel in a menu way or you want to list it in the content and links direct to other pages?
i replied to your question about one vie pointing to another but just thought it may be not needed.
Yeah
Thanks for getting back to me:
I want the first view "Continent" displayed on a page and when the user clicks say "India" I want to re-direct to the Species page for "India" (Both pages are Views pages)
Does that make sense??
ok i missleaded you,
ok i missleaded you, sorry.
you dont need a customfield, just this views you created, they should be pages with urls set.
so you have one page listing all you want, you set the urls in a corect way (for example url pointing to species from India "species/india") and then the second view as said before takes an argument from the url (provide default argument from url or sth like that setting) has an url sth like "species/%1"
Thanks
For clearing that up. Ok I'll take your advice and go down the URL road!
Sometimes with Drupal it's hard to see the wood for the trees !
Once again Thanks for answering my query, and for introducing me to the views_embed function, I'm sure that will come in handy for something. -:)
Give more details
Hi,
Please give more details on how you achieved above.
Thanks
Do you know how to create
Do you know how to create views and views with arguments, page displays? if not please read/search about that.
Thanks for your support
Hi,
If possible just give me the steps to achieve the above ?
Thanks
Deepak