Hi guys,

It'd be great if we could have a direct link to the Import pages in the admin menus for both the root /import page and also the individual import profiles pages (/import/name_of_import_profile).

Currently, other than manually typing /import or creating a link yourself, the only way is to click on Admin Menu - Structure - Feeds importers - name_of_import_profile and then click the "Import" link sitting amongst the main paragraph text on the "Getting started" root page for the individual importer and then click on the import profile you want to use.

I was thinking maybe adding a link under the Admin Menu - Structure - Feeds importers menu item called "Import" which takes you to the default import page (/import) where you can then choose an import profile to use and also maybe one listed underneath each import profile in the admin menu, so Admin Menu - Structure - Feeds importers - name_of_import_profile - "Import" which takes you to /import/name_of_import_profile

Thoughts?

Thanks,
Chris

Comments

megachriz’s picture

That's a great idea. I'm not sure what's the best approach to implement that, though.

One possibility is to add an item called "admin/structure/feeds/import" to feeds_ui_menu(), but then it would not link to "/import", but to "/admin/structure/feeds/import". This could be an issue if contributed modules modified the "import" menu item, for example to supply a custom access callback.
An other possibility is to create the menu link manually upon installing the Feeds UI module, but then it could be deleted by an admin user.

For D6, this has requested before: #671460: Import is not appearing in Administration menu. In that issue it was suggested to create the menu item yourself.

twistor’s picture

Version: 7.x-2.0-alpha8 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.26 KB

I'm not sure about the performance implications of this.

It would be nice if we could use hook_admin_menu_map(), but I don't think that's possible, since we're not using the real menu structure. Perhaps we could add some more data to the active import cache so that we could build the menu without loading all importers.

Chasen’s picture

Thanks - I'll test this and get back to you.

maico de jong’s picture

#2 Works for me

demonde’s picture

#2 Works fine.

When will it get implemented after one year?

tterranigma’s picture

Status: Needs review » Reviewed & tested by the community

Tested it and it works as expected. No issues whatsoever.

@demonde

When will it get implemented after one year?

Anything else with your order? Are you afraid to change the status to RTBC?

megachriz’s picture

@tterranigma
The concerns in #2 are about possible performance implications. Did you test that aspect?

tterranigma’s picture

@MegaChriz
I didn't test it is a systematic way, however the output of this hook is cached, so the overall performance should be comparable to that of the native hook_menu. Also, by default admin_menu caches the menu on the client side too.

megachriz’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.05 KB
new1.24 KB

Okay, at first glance #2 doesn't seem to produce that much overhead. The code is only ran when caches are cleared and once for every user that uses admin menu.

The attached patch also adds "Import" as a local task on the content overview page. I thought that should be added as well for consistence.

demonde’s picture

#9 works fine for me.

  • MegaChriz committed fafade6 on 7.x-2.x authored by twistor
    Issue #2382245 by MegaChriz, twistor: Added import links to the admin...
megachriz’s picture

Status: Needs review » Fixed

Thanks for reporting back. Committed #9.

Status: Fixed » Closed (fixed)

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