Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jordan Smith 7 posts 77 karma points
    Nov 06, 2019 @ 16:19
    Jordan Smith
    0

    Getting a Preview in the grid editor

    I am having trouble getting a preview to show in the grid editor after the DTGE is added to a page. I am getting the default Icon with the title underneath, but would like the content of the grid editor displayed. I noticed that the path generated in the grid.editors.config.js for "viewPath" is different than the DTGE package.manifest path. Is the DTGE placing the previews in a new location in umbraco8?

    grid.editors.config.js:

    {
        "name": "Doc Type2",
        "alias": "docType",
        "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
        "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
        "icon": "icon-item-arrangement",
        "config": {
            "allowedDocTypes": [],
            "endablePreview": true,
            "viewPath": "/Views/",
            "previewViewPath": "/Views/"
        }
    }
    

    package.manifest

    {
      "name": "Doc Type",
      "alias": "docType",
      "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
      "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
      "icon": "icon-item-arrangement",
      "config": {
        "allowedDocTypes": [],
        "nameTemplate": "",
        "enablePreview": true,
        "viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
        "previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
        "previewCssFilePath": "",
        "previewJsFilePath": ""
      }
    }
    
  • Jordan Smith 7 posts 77 karma points
    Nov 11, 2019 @ 19:19
    Jordan Smith
    0

    So after much trial and error to get the preview to show on the backend I was able to finally get my grid editors to preview by removing the auto-generated definition for the grid editor in the grid.editors.config.js file then switching the enablePreview attribute in the package.manefest of the DTGE to "true". So far all other rendering and previews seem to be working. I will comment again if there are any more updates.

  • Arun 136 posts 369 karma points
    Apr 23, 2020 @ 11:19
    Arun
    0

    Hi I have the same problem

    i have specified the preview path in grid editor.config but doesn't seems workingenter image description here

Please Sign in or register to post replies

Write your reply to:

Draft