Problem/Motivation

When using the Navigation module from Drupal core, there is no dedicated CRM section:

Screenshot of navigation sidebar

Proposed resolution

It would be helpful if there could be a "CRM" subsection - preferably in the second region near "Create", "Blocks", "Content", ...

This would then be something like:

- CRM >
  -  Contacts
  - Methods
  - Relationships
  - ...

Or even quick-create links to add contacts, relationships, ...
To be decided what is desired and possible, within the Navigation module's possibilities.

Issue fork crm-3567098

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

svendecabooter created an issue. See original summary.

svendecabooter’s picture

Issue summary: View changes

svendecabooter’s picture

Status: Active » Needs review
StatusFileSize
new80.8 KB

See MR for an implementation of this.

BEFORE:

Screenshot of navigation sidebar before the change

AFTER:

Screenshot of navigation sidebar after the change

jdleonard’s picture

Title: Add section to Navigation module » Add CRM section to Navigation module
Category: Task » Feature request
Status: Needs review » Needs work

I tested this locally. This looks great!

My only suggestion is to remove the "Crm" prefix from CrmNavigationDeriver as it is unnecessary and our other class names all omit the module name prefix.

svendecabooter’s picture

Status: Needs work » Needs review

Makes sense - MR updated.

jdleonard’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, thanks!

bluegeek9 made their first commit to this issue’s fork.

bluegeek9 changed the visibility of the branch 1.0.x to hidden.

bluegeek9’s picture

Status: Reviewed & tested by the community » Needs work

I appreciate your work on this and the several other issues you have worked on.

We need tests for new features. Can you add tests for the navigation integration?

I think we should also add the contacts to create menu.

I am not familiar with navigation. I took a brief look at how content is added to the create menu.

NavigationContentLinks.php

$this->addCreateEntityLinks('crm_contact_type', 'entity.crm_contact.add_page', $links);

NavigationHooks.php

  #[Hook('menu_links_discovered_alter')]
  public function menuLinksDiscoveredAlter(&$links): void {
    $navigation_links = \Drupal::classResolver(NavigationContentLinks::class);
    assert($navigation_links instanceof NavigationContentLinks);
    $navigation_links->addMenuLinks($links);
  }
svendecabooter’s picture

Status: Needs work » Needs review

- Added test coverage
- Added contact bundles to "Create" menu.

bluegeek9’s picture

Status: Needs review » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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