Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While navigating using jump menus, once the page finishes loading, the jump menu returns to it's default state. It might be good to retain the current users location so they know where they are. (i.e. instead of --Select destination-- the jump menu stays at 'Home' or 'About Us')
Comment | File | Size | Author |
---|---|---|---|
#10 | jump_menu-pre_select_current_page-1504520-10.patch | 552 bytes | Cyclodex |
Comments
Comment #1
doublejosh CreditAttribution: doublejosh commentedHad been thinking about this.
Should the "select a destination" be removed in this case?
Comment #2
doublejosh CreditAttribution: doublejosh commentedchange title
Comment #3
pixelsweatshop CreditAttribution: pixelsweatshop commentedI suppose this issue is coupled with this one #1504514: Utilize block title instead of --Select desitation-- and really depends on what is implemented there. And I guess providing the site builder with these options in your future Admin UI might be the best option. Once again, making very few assumptions of what they want and just providing them with the options to do either on a block by block basis.
Comment #4
doublejosh CreditAttribution: doublejosh commentedIssue: if they have not yet made a choice, but the select list is set to the current page, it's not obvious what the select list is.
Comment #5
pixelsweatshop CreditAttribution: pixelsweatshop commentedThat's a good point. Maybe my suggestion is over-complicating something that is already very usable and intuitive for end-users
Comment #6
doublejosh CreditAttribution: doublejosh commentedI think one of the other modules does implement this. It would probably need to be an option per menu.
Linking to admin UI: #1251264: Admin Interface
Comment #7
doublejosh CreditAttribution: doublejosh commentedComment #8
doublejosh CreditAttribution: doublejosh commentedComment #9
Cyclodex CreditAttribution: Cyclodex commentedHey
First I want to say nice module, exactly what I searched for.
I just came over the same issue for my project. The select field has some navigation links, but after switching to the page, the select field just has the first item selected (in my setup there is no select text or similar).
The problem is then not only that it does not look correctly, it is also no possible to switch to this item any more. But doesn't matter, its anyway not the way I wanted it to have.
Because I also played around with the views jump menu, I searched for the code where it is selecting the correct page (there it works nice).
Here is the related code of the views plugin: LINK to API
So for my project this code worked well, perhaps you can implement this as an option or similar, if you don't want to make this a default behaviour.
Hope this is helps you too:
jump_menu/jump_menu.module near LINE 48
Let me know what you think about that and if it works for you!
I can create a patch if you like, when I have some more time.
Cheers Cyclodex
Comment #10
Cyclodex CreditAttribution: Cyclodex commentedAnd here is the patch against current dev.
Comment #11
valderama CreditAttribution: valderama commentedThanks for the patch! It applied cleanly also to 7.x-1.4
Also I discovered no problems so far.
Comment #12
Cyclodex CreditAttribution: Cyclodex commentedcool!
@doublejosh
What do you think ? Can you try it out and if fine you could commit that patch.
Comment #13
codenamerhubarb CreditAttribution: codenamerhubarb commentedI can also confirm the patch in #10 has solved the problem for me in 7.x-1.4. Thanks!
Comment #14
doublejosh CreditAttribution: doublejosh commentedThis really needs to be an admin option per block.
In the case that a page is landed on from organic search or outside using the drop down it would be confusing not to see the "Please Choose" message.
I see this more of a preference and definitely not appropriate in all cases.
Happy to add a patch including admin option!
Sorry don't have the time at this moment.
Comment #15
jami3z CreditAttribution: jami3z commentedNot working for me, does this only work if using the supplied jump menu blocks? I've inserted mine using the code supplied and the list defaults back to the "-select-" option.
cheers
Comment #16
Cyclodex CreditAttribution: Cyclodex commentedWhat values do you have in your options and what is your url?
$current_url = url($_GET['q']);
You can also try to debug this with some dpm() calls in the code.
Do they match ? (one option should match)
Comment #17
Cyclodex CreditAttribution: Cyclodex commented@doublejosh
True, but I am also really busy :)
Comment #18
doublejosh CreditAttribution: doublejosh commentedComment #19
doublejosh CreditAttribution: doublejosh commentedBTW: There another patch here too.
#1997382: Display selected item
Really want to wait and have this be config since some use cases wouldn't want the current item selected.
Comment #20
doublejosh CreditAttribution: doublejosh commentedHave this in the dev branch now. It's a configurable option on block edit. Pretty please test this.
http://drupalcode.org/project/jump_menu.git/commitdiff/9f217a5?hp=542ac2...
May want to store the data differently than this first go round. Note that putting this on a live site might mean having to update the block settings again later.
Comment #21
doublejosh CreditAttribution: doublejosh commentedWill be in next release.
Comment #22
doublejosh CreditAttribution: doublejosh commentedNOTE: If you used this dev feature, when upgrading to 7.x-1.5...
You will need to RESAVE all blocks with this set.
The data storage is being updated to allow many settings per block.
Comment #24
wooody CreditAttribution: wooody commentedThank you..