The Views 6.x-2.7 release notes mention a new "jump menu" feature, but I can't find documentation anywhere. What is this? How does it work?
The Jump module maintainers are wondering, too: #610116: Views integration
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | views-jump-menu-help-622740-26.patch | 4.16 KB | marcp |
| #10 | Image 1.png | 26.34 KB | amitaibu |
| #10 | export.txt | 2.71 KB | amitaibu |
Comments
Comment #1
dawehnerSee includes/jump-menu.inc of ctools for more informations.
Comment #2
aren cambre commentedNeeds to be openly documented at drupal.org.
Comment #3
merlinofchaos commented/me rolls eyes.
Comment #4
evoltech commentedThis file does not exist in any of the branches I can find of ctools. I do see that there is a few files with 'jump' in the name in the views repo: ./plugins/views_plugin_style_jump_menu.inc
./plugins/views_plugin_style_summary_jump_menu.inc
Please advise.
Comment #5
marcp commentedincludes/jump-menu.inc is in the DRUPAL-6--1 branch of ctools.
Comment #6
DocMartin commentedJust found Jump Menu among style options in Views.
Thought I'd give it a try.
Selecting jump menu as display, I see
"To properly configure a jump menu, you must select one field that will represent the path to utilize. You should then set that field to exclude. All other displayed fields will be part of the menu. Please note that all HTML will be stripped from this output as select boxes cannot show HTML."
In fields for View, I've tried selecting Node:Link, and excluding this from display. No matter whether I choose to output this as link, with [Node_view] as code, or don't check output as link, the jump menu takes me to a non-existent page with URL /view
- I'd also tried the more obvious Node Title, linked to Node, as field. Use this to create more mundane menus, but not working w jump menu. Tries to visit page with title as URL.
Tried a few things, like - in jump menu options - grouping fields by title; in Fields - setting Node Title above Node Link.
So I've done something, but not functional... yet.
Wonder re jump menus and SEO/search engine robots - will search engine spiders see and follow the links?
... not rolling eyes. More a wry laugh
Comment #7
merlinofchaos commentedYou want to use a link like node/[nid] rather than the Node: Link functionality.
The Node: Link field generates a link: i.e,
viewWhen translating that to a destination, the HTML is stripped and you are left with 'view'. I realize this isn't completely intuitive, because you are expecting to get the URL that it is linking to, but that is unfortunately not what Views sees.
Comment #8
DocMartin commentedAh, that explains why I jumped to /view
The pages I want to link to have URLs built with [term-raw]/[title-raw] (Pathauto)
Can't see how to create a field that will include this, and will create the URL for Jump to use.
Node:Link looks possible, but I've tried putting [term-raw]/[title-raw] into "Rewrite the output of this field" box - so Views might not see it as a regular link, but no joy; noticed that only have few choices as substitution patterns, and also tried the [view_node] in this box field.
Presumably, Pathauto tokens not processed here.
But I've also tried node/[nid] - if in "Rewrite the output of this field" box, I get taken to URL with /node[nid] (no subsititution)
If node/[nid] into rewrite as URL, again to /view
Maybe there's a field type that I'm overlooking; or maybe a field type that Jump Menu can use would be handy.
Comment #9
clemens.tolboomimho Jump Menu is a little bonky. It took me a while until I read in #7 "HTML is stripped" ... meaning the 'normal' output of the field is stripped and so the text value is used as the "link to" you must make sure it starts with a '/'
1. use Node: nid
2. Rewrite the output of this field
3. Enter "/node/[nid]"
or
1. Use Node: path which contains a "/" at the start.
Make sure to reconfigure Jump menu style to use the correct field.
As a last step "Exclude from display" that field.
Comment #10
amitaibuAttached a screenshot that shows the configuration of the view, and its export.
Note that we exclude the Node:NID from the View, and rewrite it's output.
Comment #11
caponey commentedI did what Amitaibu said, and it worked. Except....only if I use it from the front page. If I select a link from the menu on anywhere but the front page, it takes me to a page not found.
Comment #12
dawehnerWhat about marking this as novice documentation task.
Comment #13
iamjon commentedI'm assigning this to me so I can take care of it.
Comment #14
bandelier commentedThis *almost* works for me - but I don't want the selection to go to the node page - I want to control where this goes, as it is a step in my registration process - if the user selects from one of the drop-down options, I want them to be directed to another page (/user/registration) vs. a content profile registration page.
Would be nice if this had better documentation and was more flexible with its options - if the only option is to go to the nid, then why not just hard code that into the jump page logic instead of making people wander around trying to discover these settings?
Comment #15
merlinofchaos commentedYou select a field that represents the destination. You are not limited to nid at all.
Comment #16
bandelier commentedI tried to add a general link by using "Global -> Custom Text" for the link - this did not work. When I tried to circumvent the nid by excluding from display, choose "Rewrite the output of this field", then add the path "/user/register/%page", I only get a single response back in my drop-down list - yet I should have 400+ results from the query. Unless someone has another trick, this does not work unless you want to link back to the node.
Comment #17
merlinofchaos commented/user/register/%pageWhat is %page? %page is not a token Views understands, that's for sure. I'm not at all sure what you're expecting it would be, either.
It appears that you're assuming some kind of data will be there and when it doesn't work, blaming Views for it not being there.
Comment #18
merlinofchaos commentedNote that one possible hiccup here is that the way the jump menu works, each item in the list must have a unique destination. Having several links that all go to the same location will fail exactly as you have described.
Comment #19
bandelier commented%page is simply a placeholder for a custom registration page. the jump menu serves a single purpose, seemingly. would be nice to have "compliant" form processing that would use the form action instead of individual node/item action. guess i expected too much.
Comment #20
merlinofchaos commentedexpected/assumed too much. The jump menu sets a destination per item. That's the whole point. Trying to use it as a general purpose form with a single action is completely not its intent.
Comment #21
bandelier commentedwould be nice if that "intent" were documented somewhere instead of making people run around in circles.
Comment #22
merlinofchaos commentedWould be nice if users would stop treating the authors of software they get for free with sarcasm and derision because things don't work exactly the way they expect or want.
Comment #23
bandelier commentednot my intention, and apologies if that's how it came across. just going through a rough patch while attempting to find a solution to a very specific issue that has my noggin tied in knots. trust me - if you're developing anything on Drupal, you're light years ahead of me in terms of ability and knowledge. next step for me: buy book, learn APIs and stop whining.
Comment #24
bandelier commentedp.s. i did find a non-views way of doing this via a straight sql query in a block/page or what have you for anyone else who is looking:
http://drupal.org/node/353292
echo $PHP_SELF " method="post">Comment #25
merlinofchaos commentedThat's probably a better option than trying to use Views for it. Sometimes some things just require writing the code to do it.
Comment #26
marcp commentedAfter that exchange, I hesitate to re-open this, but here's a patch to add some jump menu words to the advanced help. Patch is against DRUPAL-6--3.
Comment #27
jrabeemer commented+1 to #26
I finally got this jump menu working after many tries. It is definitely not intuitive or self-evident to use unless you use the steps outlined in the patch above.
Comment #28
Sjarsena commented+10,000,000 #26
After a whole day of trying different things finally I got this working. That patch is awesome just follow those directions really really helped do what I needed.
Thanks marcp
Comment #29
dawehnerAssign to esmerel for review.
Comment #30
parasox commentedHow can I get a Jump Menu to work with Taxonomy Terms? I want to put my categories into a jump menu dropdown, but it doesn't link to the right place as above. However they're not nodes, so the above instructions don't work for me. Any info appreciated! I did check the patch but nothing re: taxonomy in there.
Comment #31
iamjon commentedparasox,
Please open a new thread or review the patch that was listed here.
Comment #32
esmerel commentedcommitted patch to 6.x-3.x
Comment #34
eridolfi commentedsubscribing