Announcement

Collapse
No announcement yet.

Custom layout in Module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom layout in Module

    We have a bunch of customisations including some new entities, with detail layouts we've added using the Layout Manager.

    We're in the process of moving our customisations into their own module. It's all working except the custom layouts.


    When a layout is created with the Layout Manager, it adds the saved layout in custom\Espo\Custom\Resources\layouts\<entity>\deta il.json (where of course, <entity> is my entity name)

    Moving everything into my new module, I put this in custom\Espo\Modules\<module>\Resources\layouts\<en tity>\detail.json but it's not being picked up when I add the module to a clean install - to confirm, everything else is working fine in the new module location - the Custom/Espo/Custom folder is empty, with the new entities working.

    I'm guessing I've missed a definition somewhere - do I need to explicitly point the entity in the module at the layout somewhere?
    Last edited by BattleMetalChris; 12-05-2023, 04:41 PM.

  • #2
    It should work for custom entity types (the module is defined by metadata > scopes > {EntityType} > module). It won't work for standard entity types (there's a mechanism to make it to work in the v8.1 though).

    Comment


    • #3
      Yes, this is a custom entity type.

      I compared the layout file generated by the Layout Manager with the file I have in my module folder (in case I had a typo, or needed to specify a path or something) and their contents are identical.

      Comment


      • #4
        This parameter determines from where to read layouts: https://github.com/espocrm/espocrm/b...ccount.json#L7

        Comment


        • #5
          Ah that's worked! Thanks very much

          Comment

          Working...
          X