Adding Additional View Mode to Contacts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goodwill
    Junior Member
    • Feb 2020
    • 28

    Adding Additional View Mode to Contacts

    I'm currently working on customizing the Contacts entity in EspoCRM and I would like to add a view mode that displays the contacts in a card view format. Additionally, I want to include a button in the view mode list called "Card View" to easily switch to this new view.

    Could anyone guide me through the process or provide any resources or tips on how to achieve this?

    Thank you so much in advance for your help and support!
  • yuri
    Member
    • Mar 2014
    • 8444

    #2
    In clientDefs/Contact.json:

    Code:
    {
        "listViewModeList": [
           "list",
           "myCards"
        ],
        "recordViews": {
           "myCards": "my-module:views/my-cards
        }
    }
    Then clear cache.

    Though "listViewModeList" is not documented, I think it will become an official parameter in the future.

    Note that I didn't test this.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8444

      #3
      Related: https://forum.espocrm.com/forum/feat...s-in-list-view
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • goodwill
        Junior Member
        • Feb 2020
        • 28

        #4
        yuri Thank you, but currently, it does overwrite the
        Code:
        viewModeIconClassMap and listViewModeList
        , I saw that in the latest commit it going to be fixed and custom view modes get appended
        You are awesome <3

        for future onlookers here's additional help
        The idea of this thread is to create a &quot;road map/guide&quot; to help developers find where GUI sections or elements are defined within Espo code so customization projects can be implemented without having to spend a lot of time &quot;finding your way around&quot; the code (like many of us have done) whenever possible.
        Last edited by goodwill; 06-09-2024, 08:38 AM.

        Comment

        Working...