backdrop-contrib / video_embed_field

Video Embed field creates a simple field type called Video Embed that allows you to embed videos from YouTube and Vimeo or show their thumbnail previews simply by entering the video's url.
GNU General Public License v2.0
1 stars 5 forks source link

No menu item for admin/config/media/vef/settings #28

Closed herbdool closed 8 months ago

herbdool commented 8 months ago

In hook_menu, admin/config/media/vef/settings is defined as MENU_NORMAL_ITEM but I don't see it appearing. Maybe Preset API interferes with this?

I think the easiest is to make the settings a different path. Perhaps just admin/config/media/vef-settings. That's similar to how images are done: the styles are a separate menu item.

laryn commented 8 months ago

@herbdool I made an alternate PR to try to clarify the menus. See what you think. If possible, I'd like to keep the VEF menu items all contained together to prevent menu sprawl.

CleanShot 2024-03-26 at 13 52 21@2x

https://github.com/backdrop-contrib/video_embed_field/pull/32

herbdool commented 8 months ago

@laryn If admin_bar module isn't enabled, there's still no way to get to that settings page, except by typing in the path. All you see is:

2024-03-26 15 16 39 bd3 lndo site f5998e8a04b7

How about you also change the menu to MENU_LOCAL_TASK:

$items['admin/config/media/vef/settings'] = array(
    'title' => 'Settings',
    'description' => 'Video Embed Field settings',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('video_embed_field_settings_form'),
    'file' => 'video_embed_field.admin.inc',
    'access arguments' => array('administer video styles'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );

Then it appears as a tab:

2024-03-26 15 29 05 bd3 lndo site 874870b9026e

laryn commented 8 months ago

That works. CleanShot 2024-03-26 at 14 36 55@2x

And it's also linked from the module page: CleanShot 2024-03-26 at 14 37 23@2x

herbdool commented 8 months ago

@laryn looks good