Skip to content

Latest commit

 

History

History
91 lines (73 loc) · 1.69 KB

custom-view-in-amind-panel.md

File metadata and controls

91 lines (73 loc) · 1.69 KB

Custom View In Asset Panel

Controller

  [Authorize(Roles = "WebEditors, WedAdmins, Administrators")]
    public class CustomViewController : BasePageController<CustomPage>
    {
        public ActionResult Index()
        {
            return PartialView("~/Views/Widgets/CustomView/Index.cshtml");
        }
    }

module.config

<?xml version="1.0" encoding="utf-8" ?>
<module>
  <dojoModules>
    <add name="jondjones" path="Scripts/widgets" />
  </dojoModules>
</module>

CustomViewInAssetPane/Views/Widgets/CustomView/Index.cshtml

<div>Custom View</div>

Javacsript Appraoch

ClientResources/Scripts/widgets/jondjones/CustomView.js

define([
    "dojo/_base/declare",
    "dijit/_WidgetBase",
    "dijit/_TemplatedMixin"
], function (
    declare,
    _WidgetBase,
    _TemplatedMixin

) {
    return declare("jondjones.jondjones.CustomView",
        [_WidgetBase, _TemplatedMixin], {
            templateString: dojo.cache("/en/customview")
        });
});

ClientResources/Scripts/widgets/jondjones/UserManual.js

define([
    "dojo/_base/declare",
    "dijit/_WidgetBase",
    "dijit/_TemplatedMixin"
], function (
    declare,
    _WidgetBase,
    _TemplatedMixin

) {
    return declare("jondjones.jondjones.UserManual",
        [_WidgetBase, _TemplatedMixin], {
            templateString: dojo.cache("/Static/UserGuide/ContentEditorsUserManual.html")
        });
});

Static/UserGuide/ContentEditorsUserManual.html

<div>
    <h3>Content Editors User Manual</h3>

    <a href="./ContentPage.html">Content Page</a>
</div>

Static/UserGuide/ContentPage.html

<div>
    Information goes here
</div>