In a situation where there might be multiple jump menus on a single 'page' it might be nice to swap out the -select destination- as the default state for the menu title. This way it will condense the UI and also give the end user granular control over this by just being able to edit the block title.

A screenshot that demos the issue (not that anyone would have all of these enabled at the same time-just for demo purposes)

screenshot

CommentFileSizeAuthor
Picture 2.png22.58 KBpixelsweatshop

Comments

doublejosh’s picture

Status: Active » Needs work

Perfect clean solution.
I was going to wait until I created an admin UI to deal with this issue, but this is a perfect stopgap.

doublejosh’s picture

Priority: Normal » Major
doublejosh’s picture

Committed: 5c80c65b08c52ef3e0f794655f59dfb7bda1ab61

Found it a bit odd as the first item now looks in line with the rest of the menu.
But using the menu name makes it "configurable" via the menu UI prior to me creating a separate option field.

doublejosh’s picture

Status: Needs work » Needs review
pixelsweatshop’s picture

Status: Needs review » Needs work

Just tested. It appears to use the menu title, but not the block title. Therefore changing the block title in the block's settings does not change the default.

doublejosh’s picture

Ahh, nice. Didn't realize that was the goal. Way better!!

Fiddled around, but that info isn't present in hook_block_view(), have to wait until hook_block_view_alter() so it throws off the rendering.
Will take more effort.

This might be worth a new release with the other changes.

doublejosh’s picture

Status: Needs work » Needs review
doublejosh’s picture

Status: Needs review » Closed (fixed)
doublejosh’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

There's a problem with this.
If you set the block name, it will insert into the select list. However that point you'll want to set the block title to ... which gets you a nice catch 22.
Looks like I'll have to actually add a "Choose" field to the block settings.
This will have to be part of the Admin UI.

Unless you have another idea.

doublejosh’s picture

Ok, decided to go ahead and strip the title off the block and use it if it's set.
Can change this when the full admin UI is solidified and added.

doublejosh’s picture

Status: Postponed (maintainer needs more info) » Needs review
pixelsweatshop’s picture

Status: Needs review » Reviewed & tested by the community

Works great. This is a nice little feature until the UI is completed. The only issue I see is if the user sets the block title to <none>, the jump menu displays as the top level. No biggie really, as one wouldn't/shouldn't really do that when using this module. When the admin UI is complete, this will be moot.

doublejosh’s picture

doublejosh’s picture

Status: Reviewed & tested by the community » Closed (fixed)