As per #622740: Please document "jump menu" when using a Jump Menu in a Block to display taxonomy terms from a vocabulary, the paths don't go where they're supposed to and 404. The patch in the other issue doesn't address taxonomy terms it seems.

Comments

rschwab’s picture

Category:bug» support
Status:Active» Fixed

To do this add the Taxonomy:Term ID field and rewrite the output to the path for your taxonomies. By default this should be taxonomy/term/[tid]. The advanced help closest to what you're trying to accomplish is the node edit instructions, try that as a starting point:

Jump to a node's edit page

  1. Create a new Node view
  2. Select the Node: Nid and Node: Title fields
  3. Configure the Node: Nid field to "exclude from display" and check "Rewrite the output f this field"
  4. In the text field that appears for rewriting the output of this field, enter node/[nid]/edit
  5. Configure the Node: Title field by removing the "Label" and unchecking "Link this field to its node"
  6. Set the view style to jump menu
  7. In the style settings, set the "Path field" to Node: Nid
erald’s picture

It is simple the answer is actually above:
1. create the the taxonomy view (I created a block)
2. select taxanomy term field to display the taxonomy text remove label
3. select taxonomy TID
4. exclude from display
5. rewrite output to read /taxonomy/term/[tid]
6. select jump menu style
7. in the style settings set path field to TID

that's it working perfectly for me.

Now it would be nice if I have selected a certain term the select box would display the selected option but it returns to - Choose -

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nedjo’s picture

Status:Closed (fixed)» Active

The workaround in #2 is only a partial solution. Prefixing a path with / will get the base path only under certain circumstances (site not in a subdirectory, language prefixes not in use, don't need link to go to an alias, etc.).

The issue is that we need to be able to feed in the full path as produced by url(). This is what's produced by the Node: path field, but we don't have parallel fields for e.g. taxonomy terms.

Cottser’s picture

I ran into this as well on a multilingual site with language prefixes. I ended up using http://drupal.org/project/jump instead (the jump_quickly() API) because I needed custom URLs.

nedjo’s picture

Needed this for a project so posted a sandbox project providing a taxonomy term path views field, http://drupal.org/sandbox/nedjo/1182796.

Would be easy to adapt a Views patch from this.

Cottser’s picture

Thanks for sharing that. I revised my comment in #6, I was trying to use a custom Drupal path containing a tid and assumed it would work out. I don't think your added field works in my situation, but I'm sure it will help others!

erok415’s picture

<**Using Drupal 7 with latest Views module.**>

I have a follow up to this and need help. I have created other views using taxonomy but not a jump menu yet. So when I created a Jump Menu using taxonomy I had some issues.

1. I added a filter criteria taxonomy term called "mytag".
2. Created a Field (Content: Title) and checked "Link this field to the original piece of content".

The auto preview looks just like I want it to and the menu includes the node/titles that I wanted to display. The issue is that the menu jumps the user to the character string of the jump menu.

Example: Say one of the menu items is "Learn how to write in C++". Once clicked the user is taken to "http://www.mydomain.com/Learn how to write in C++".

Any help is much appreciated.
E.

erok415’s picture

I figured it out. See this -> http://drupal.org/node/1203008

dawehner’s picture

Status:Active» Fixed

So this issue seems to be fixed.

rschwab’s picture

@Nedjo feel free to open another issue as a feature request for #7 if you're so inclined.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tchopshop’s picture

I have a multi-user blog which displays on the user profile page. I want to create a taxonomy term filter block (jump menu) on the sidebar for taxonomy terms -- but here's the catch -- the terms would be only from the posts that the user has authored... and selecting that term would take you to a term page that only displays posts by that author.

I'm having a lot of trouble with this... any help would be much appreciated!

austintnacious’s picture

Status:Closed (fixed)» Active

@ nedjo in #7

I've never used git and I don't know how to get to your code.

I desperately want a "taxonomy term path views field" is there another route for me to access your code?

nedjo’s picture

The example linked in #10 does not address the problem identified in this issue (it's for a node jump menu filtered by taxonomy term, not a taxonomy term jump menu).

@austintnacious: I created a short handbook page explaining how to use Git to download a sandbox project: http://drupal.org/node/1294804.

austintnacious’s picture

Status:Active» Needs review

You Sir. . . are the D-I-iggidy-ogs B-I-iggidy-ollocks!!!

Man of the Match!

Don't ask me what all the Git wotnot was about but I got through it, I tried the smartGit GUI program, couldn't make any sense of that, used the command line from your sandbox page at the windows command prompt (after installing Git for Windows), got the module.

Tried it! Works as advertised! Score one for the needy! Thank you Nedjo!

I have been screwing around for days trying to find a solution for "A Simple" jump menu to move between views page displays for different taxo terms / sub-terms.

Due to the fact that I don't like and have over-ridden the default /taxonomy/term/x paths, preferring instead a more humane, SEO-friendly and IMO logical hierarchical URL structure, e.g. /vocabulary/sub-category/term/content and the fact that I like my URLs without spaces and other weird characters and URL-encoded noise. . . i.e. I think a moderately intelligent human should, with a reasonable level of confidence, be able to tell from the semantic payload of a URL, i.e. /keyword-01/keyword-02/keyword-03/..., what kind of info they are likely to find upon visiting that URL. . . further an even more moderately smart being might be able to infer (from their own understanding of how the subject at-hand is ordered) something of the organisation of a site based on his/her understanding of the psuedo directory structure implied by the words nested in the URL.

Anyway, I've tried to structure my taxonomy and related URLs in a way which makes sense in my wobbly Center of the Universe and that just has not been an intuitive process via views (native) and all of the modules that I've found which orbit around the issue are broken, un-maintained, incompatible or something. (e.g. like I'll find myself thinking "Great, that works" but then I'll find that because the term defined in the (parent) Taxo Term relationship is a "two word" term the path to the "sub term" used in the argument is broken, instead of "vocabulary/two-word/sub-term as expected, I get vocabulary/two word/sub-term. A views display with similar relationships and arguments which just looks at the top two levels (vocabulary/two-word) works fine.

The point I'm trying to make is "views_path" fills what seems like it should be a common enough use-case to warrant becoming a full on module if not being brought into Views as a default/native field.

All those in favour. . .

amitkarpe’s picture

Thank You.
This works for me in Drupal 7.

geyids’s picture

Issue tags:+#taxonomy

Please help... I have tried this a million times this is the kind of link I get http://www.mydomain.com/46f5c582fd21f635d781c6e55f18ed38::/content-categ...

I followed step by step just cant get it working. what am I doing wrong?

geyids’s picture

http://drupal.org/project/jump works juuuuust fine. no hussles cheers guys

codenamerhubarb’s picture

Just like geyids I am also getting strange, randomized code like the following "3760b816f085517bca5fac9780e7f143::" generated at the start of my URLs, which breaks the jump links.

I am using 6.x-3.0+74-dev

UPDATE:
I used a terrible hack which seems to have fixed the problem for me.

In line 124 of views_plugin_style_jump_menu.inc I changed it from
"$key = md5($path . $field) . "::" . $path;"
to just
"$key = $path;"
Now the links aren't encrypted.

rockland’s picture

I had the same problem as @geyids and @codenamerhubarb using Views 6.x-3.0 on Drupal 6.27. @codenamerhubarb's hack worked perfectly (though in this version of Views, it's on line 123), but I would love to not have to use a hack. Hopefully this can be looked at and fixed in the next version of Views 6.x-3.x.

Thanks to @codenamerhubarb for this tip!

Chimos’s picture

I find this problem fixed in Drupal 7 this way, without hacks or extra modules:

  1. Create a block in views to show taxonomy terms.
  2. In the view config., In Fields section, we have Taxonomy term: Name (the terms to be displayed), then add Taxonomy term: Term ID.
  3. Term ID settings:
    • Uncheck Create a label.
    • Check Exclude form display.
    • In the Rewrite results tab, check Rewrite output of this field. And in the text field write taxonomy/term/[tid]
    • Apply the changes.
  4. In Format section, select Jump menu. And in its settings select Taxonomy term: Term ID as Path field
  5. Save the view

After this you get the block with the terms selector, and if you select one of the terms, the paths are nicely built (In my case www.myweb.com/tags/example-term, with lowercase letters and dashes instead of spaces)

(I'm using 'Pathauto' module and I have 'Clean URLs' enabled)

Hope it helps, cheers

Alexandar Davidovic’s picture

Issue summary:View changes

Thanks Chimos, that did the job for me.