sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Render error if a manifest does not contain a "main" template #190

Open Timo-Breumelhof opened 1 year ago

Timo-Breumelhof commented 1 year ago

This template works:

{
    "editWitoutPostback": true,
    "index": true,
    "templates": {
        "base": {
            "type": "single",
            "title": "base",
            "clientSide": false,            
            "main": {
                "template": "template.hbs"
            }
        }
    }
}

This one doesn't

{
    "editWitoutPostback": true,
    "index": true,
    "templates": {
        "base": {
            "type": "single",
            "title": "base",
            "clientSide": false,            
            "main": {
                "template": "template.hbs"
            }
        }
    }
}

As per the documentation I thought Main was used for list templates, but it's also required for single templates. I had a typo in main and it took me wile before I found the issue as nothing was rendered. I think rendering an error could help?