I have created a custom content type (say "Article") using CCK. I have used a vocabulary (with more than 15 terms, a term may have multiple parents) to categorise this content type using hierarchical select module. Now I have created following page views using the views module.

1.Recent Articles (access url : www.example.com/recent)
2.Most Visited Articles (access url: www.example.com/most-visited)
3.Top Rated Articles (access url: www.example.com/top-rated)

Now if I want to create a tabbed menu with above three menu items as its three tabs. I hope i can use "quicktabs" to achieve it (though i have not tried it yet).
But what i want to achieve is to have a navigation menu block (having each term of the vocabulary as a menu item in a hierarchical list) along with each tab. So i have modified the above access urls in my page views by adding "%1" as an argument (with my first argument as "term Id") keeping "all" as default argument. This works fine if i access these page views term-by-term by typing the url (with "all" or "term Id" appended at the end like /all, /11, /12 etc) in the address bar of my browser. But to get a menu block of vocabulary terms along with each tab means i need three menu blocks. In the menu block corresponding to first tab "Recent Articles", the url for each term will be in the following form-

www.example.com/recent/term-id

Similar will be the case for other tabs too.

But i want to create a single dynamic menu block with all vocabulary terms as a list. Each term of this list will have a url which will be decided by the present tab url that means if i am on first tab (Recent Articles) then each term will have a url like

www.example.com/recent/term-id

But if i am on the second tab (Most Visited Articles) then each term will have a url like

www.example.com/most-visited/term-id

Similarly for the third tab.

Actually i want a navigation system similar to http://win.softpedia.com/

I have tried Advanced Taxonomy Block (http://drupal.org/project/taxonomyblocks) module for this purpose but it does not provide me the functionality which i want. Can anybody guide me in the right direction!! May be i will have to create a custom block with custom php code which checks first argument of the url (which is recent, most-visited or top-rated) then decides the url of the terms in the menu block on that tab.

Thanks for any help!!

Comments

joecanti’s picture

im not sure about getting the tabs working, but taxonomy menus shoudl be easy: I've made dynamic menus in 2 ways for the taxonomy vocabularies:

Firstly, I used the module taxonomy menu, which works nicely, especially when combined with dhtml menu. This makes a nice menu of a given vocabulary, and included term depth as well.

Secondly, I used views to make a list of all the terms in a vocaulary. fairly straight forward view to make.

hope this helps, joe

aac’s picture

Thanks for your help!!
But i think your method may not solve the complete problem.
Actually i want a horizontal menu having three tabs. When i am on one of these three tabs, i want a block (implemented as a vertical tabbed menu) having a list of all my taxonomy terms arranged in hierarchical way.
It is very similar to http://win.softpedia.com/
when i am on windows tab (top horizontal), it shows me all the articles related to windows. Now when i click one of the sub-categories of windows category (left block), it shows me the articles relevant to only that sub-category of windows category.

I am still looking for solution!!

Thanks for any help!!

---~~~***~~~---
aac

ludo1960’s picture

Hi there,

firstly Quicktabs will work fine for this ie the tab part of your request as for the menu block I would try to embed another view for the menu block. ie you are on the Recent Articles tab you would create a view using taxonomy term for recent posts. I'm not quite sure of the process but it should be possible with the all powerful views module.

aac’s picture

Thanks Ludo!!
I have tried Quicktabs, but it provides a tabbed block. But i am interested in a page with three horizontal tabs each tab leading to a "page view" whose url is defined in views.
So This part of the problem is also unresolved. I think last option is to use theming for creating tabs.
If you think there is any other module or option is available, please suggest me!!
Thanks for any help!!

---~~~***~~~---
aac

ludo1960’s picture

You're right, theming is the way to go for the tabs. Should be easy enough!

joecanti’s picture

Hi,
Looking at the softpedia website thats not really tabs as such - its a menu made to look like tabs because each page menu is the same colour as the menu item which gives a nice uniformity.

If I were trying to make this I would use artisteer to make a template because making a tabbed style menu with rounded top corners on each item is easy with this software. Then I'd create a view for each menu I wanted to have, because you can make views of anything you like - recent articles/taxonomy vocabs/latest blogs etc etc. Then I'd go with a panels layout for each page, and add the views into the right pages. Then I would style the various views using css so I could get a different color background on each and set the rollover functions etc. Then style the top menu so that each item is a different colour, and the same as the different views. (not something I've done before but cant be too hard with css)

This might not be the easiest method, but just the one I would use - there's probably many ways to do this - just remember that for the softpedia site the page colour and the menu item are 2 separate things made to look like the same by using the same colour.

Hope this help, Good luck!

aac’s picture

Thanks Joe!!
For the horizontal tabbed part, theming is the best solution whether custom written or Artisteer made.
For the second part, i have tried http://drupal.org/project/taxonomy_treemenu module. It creates a very nice block having all the taxonomy terms of a particular vocabulary (even if terms have multiple parents)( I also tried http://drupal.org/project/taxonomyblocks module but it does not work if terms have multiple parents). But it does not have any option to customize the url for the terms (terms have core taxonomy's default path). So i think i will have to customize this module for my purpose.
What i want now to solve my original problem is that there should be a text area in the admin page of this module where i can write some php code which will be evaluated before printing the url for the terms in the menu block.
So the php code would be like this-

If current page url is www.example.com/recent/all, then
it will check for first argument (recent) in the url, then
the terms url in the menu block will be

If (argument(1)=="recent") {
for each term ....
print term1 name
}

www.example.com/recent/term-id_1
www.example.com/recent/term-id_2
........
.....
.....
www.example.com/recent/term-id_n

Similar will be for other horizontal tabs.
Any help in this regard will be much appriciated.
Thanks!!

---~~~***~~~---
aac

joecanti’s picture

there is another easy way to make each page different like that without php - do you use panels? If so you could make a different content type for each page, then a different panel varient for each of these. I do this for all my sites now and it works great. So for the softpedia site for example:

I want to make 3 tabs at the top for 3 pages - windows, games and drivers.

So I create 3 different content types with cck - windows, games then drivers.

Next I go to panels and enable the node template. I then edit it and add a varient. I name it 'windows' then give it the selection rule for content type 'windows'. I then do the same for the other 2 so that I have 3 varients.

So now, every time a page type 'windows' is created it takes the layout from the panel varient for the selection rule 'windows content type'

This simple method can multi theme your site and allow you to edit each part with css.

Now im guessing you want to go deeper than this with different taxonomys in a hierachical arrangement - well you can do the same method, but instead of content types you are dealing with taxonomys and instead of enabling and editing the 'node template' you enable and edit the 'taxonomy template'.

So if you have a vocab for 'windows' one for 'games' and one for 'drivers you can now have terms for each: set up the taxonomy term template in panels so that theres a varient for each vocab then the pages windows>antivirus and windows>authoring tools will both look the same eg a blue tempate. Then the pages games>cheat solutions and games>Emu also both look the same

Joe

aac’s picture

Thanks a lot Joe for you time and support. This step-by-step detailed process will be much useful for me and other community members.
At present i have only one content type and i am not using Panels. Also the top horizontal tabs which i want are three variants of the same content type. One is Recent Articles, second is Most Visited Articles and third is Top Rated Articles. These are page views created by using views module. So i have created a menu with these three menu items. Now theming can be used to make this menu a tabbed one with three tabs each pointing to one of the three page views.
I am still fighting for the second part.
Thanks!!

---~~~***~~~---
aac

joecanti’s picture

Glad to hear your making progress - sorry i mentioned the word 'easy' at the start of the last post, but it was quite complex! It's a steep learning curve getting into views etc but when you do it suddenly makes sense and drupal then becomes really powerful. It's really worth sticking with views and exploring panels as they get great results quickly once you get to know them.

There is also so many ways to do things, so i hope you find one that suits you!

Good luck! Joe

aac’s picture

I have found that vertical navigation block can be implemented best by using exposed filters. I just need to define one more filter "Taxonomy term id" and make it exposed one and by setting "exposed filters in a block", i will get a block which can be enabled on particular pages.
This exposed filter block provides a "drop down select box" with all my taxonomy terms and an apply button.
But what i want is this "drop down select box" is replaced by an unordered list (ul) with each taxonomy term as its one list item (clickable) and apply button function is replaced by click event. The live example can be seen at Drupal.org itself at http://drupal.org/project/modules where right sidebar block "Filter by compatibility" is implemented in this way.

I have tried http://drupal.org/project/better_exposed_filters module but it does not solve the purpose.
So i would like to ask how to theme exposed filter block to implement this functionality?
Any help would be much appreciated.

---~~~***~~~---
aac

aac’s picture

I am still looking for any help!!

---~~~***~~~---
aac

joecanti’s picture

Hi,

Sorry - I dont know about theming views exposed filters so cant help Im afraid,

There is some info on theming with 'better exposed filters' here:
http://drupal.org/node/766974

Also, there are several other modules which do a similar function. Have you tried Views Hacks??

Looks like you can do a fair bit with css - do you use firebug?

Cheers, Joe

joecanti’s picture

Also, not sure if the main drupal module search is done with Views exposed filters?? I thought they did it with a faceted apache solr search, but I could be wrong...

You can do it without installing the Apache Solr search stuff by using the Seach Facets module... here is a demo: http://facetedsearch.davidlesieur.com/

You can even add the CCK facets module, so you can filter by CCK Fields, and I was impressed with how well the demo page linked above handled large volumes of data - maybe an option for your setup??

cheers, Joe

aac’s picture

Thanks Joe for your suggestion!!
But what i am looking is similar to
http://www.kickstarter.com/projects/by/popular?category=Art&time=7d

Where you can view projects 'popular this week' and filter them by category just by clicking on category link.

---~~~***~~~---
aac

ludo1960’s picture

The http://drupal.org/project/menu_block module will do just that!

fseoer2010’s picture

Hello, I'm new here.thanks for the feedback, as we're a very new site yet to rank well for any key phrases but good to hear you found us that way, hopefully won't be too long before we start appearing higher for some search terms.

aac’s picture

Thanks ludo for your suggestion!!
You are absolutely right that menu_block module can provide that kind of functionality. But for me, it is not a practical solution.
I have around 15+ taxonomy terms for categorization of a custom content type. I have created "Recent", "Most Viewed", "Top Rated" and "Most Commented" page views for my content types. Now what i want is to get a filter block (having click-able taxonomy terms, path for link would depend on the current page view) corresponding to each page view. So if i use menu_block module, i will have to create 4 filter blocks, with each block having 15+ terms as its menu items and term path in each block will be according to the page view.

EDIT:
Now i am trying to achieve this as follows-
I have created a "taxonomy term type" block view. In this view i have two fields-
1.Taxonomy Term name
2.Taxonomy Tern Id

Now i am stuck at how to modify/replace each "term name" printed in the block by a click-able taxonomy term name, where link path will be decided by above mentioned conditions.
Thanks in advance for any help!!

---~~~***~~~---
aac

ludo1960’s picture

This should do it http://drupal.org/project/taxonomy_menu good luck!