How to apply layout through module?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Paulina
    commented on 's reply
    Yes, that's what I missed

  • dimyy
    replied
    Does scopes.json have "module": "Counter"?

    Leave a comment:


  • Paulina
    started a topic How to apply layout through module?

    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
Working...