EPiServer 10 Custom Dojo Gadget

Vote:
 

I am having trouble getting even the simplest Dojo gadget to work.

I've tried following the the guide on this page as well as various others: http://tedgustaf.com/blog/2014/6/create-an-episerver-widget-for-edit-mode/

What I need is an example of a Dojo front-end component that talks to a Controller to perform actions. The examples I have found are tied to Custom Properties, I need to have a gadget that is independent of Page Properties.

Is this possible?

Thanks

Matt

#185354
Nov 16, 2017 11:06
Vote:
 

Hi Matt

You can try use this as an example: https://github.com/davidknipe/VisitorGroupUsage. See this post for info on what it does: https://www.david-tec.com/2015/05/visitor-group-usage-viewer-for-episerver-8/

Its meant to be used for viewing visitor group usage. To make it "independent of page properties" drop the contextChanged handling from this file: https://github.com/davidknipe/VisitorGroupUsage/blob/master/VisitorGroupUsage/ClientResources/Scripts/visitorgroupusage/viewer.js

Also to make it Episerver 10 compatible you need to not use the dot notation here: https://github.com/davidknipe/VisitorGroupUsage/blob/master/VisitorGroupUsage/UIComponents/VisitorGroupUsageViewer.cs. Read this post for information about the dot notation breaking change in Episerver 10: https://world.episerver.com/blogs/Ben-McKernan/Dates/2016/9/the-dot-notation-breaking-change/

David

#185356
Nov 16, 2017 12:35
Vote:
 

Thanks David. This working for me and is just what I need.

#185406
Nov 17, 2017 17:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.