Announcement

Collapse
No announcement yet.

How to apply layout through module?

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

  • How to apply layout through module?

    Hello, I created extension which creates new entity. At application/Espo/Modules/Counter/Resources/metadata/entityDefs/Counter.json I have these fields:
    Code:
    {
    "fields": {
    "name": {
    "type": "varchar",
    "required": true,
    "trim": true
    },
    "size": {
    "notNull": false,
    "type": "float",
    "readOnly": true,
    "isCustom": true
    },
    "diskSize": {
    "notNull": false,
    "type": "float",
    "readOnly": true,
    "isCustom": true
    },
    "numberOfUsers": {
    "type": "int",
    "readOnly": true,
    "isCustom": true
    },
    "numberOfRecords": {
    "type": "int",
    "readOnly": true,
    "isCustom": true
    }
    }
    }
    In application/Espo/Modules/Counter/Resources/layouts/Counter/detail.json I applied a layout like this:
    Code:
    [
    {
    "rows": [
    [{"name": "name"},{"name": "size"},{"name": "diskSize"}],
    [{"name": "numberOfRecords"},{"name": "numberOfUsers"}
    ]
    ],
    "label": "Overview"
    }
    ]
    In application/Espo/Modules/Counter/Resources/module.json I have an order like this:
    Code:
    {
    "order": 15
    }
    when I install my extension layout does not apply and looks like in screenshot. So can someone explain why layout does not respond when it is through "Module" namespace?

    Click image for larger version  Name:	layout.png Views:	0 Size:	33.2 KB ID:	79416

  • #2
    Does scopes.json have "module": "Counter"?

    Comment


    • Paulina
      Paulina commented
      Editing a comment
      Yes, that's what I missed
Working...
X