Modules won't show in admin menu
Hello,
Make sure you are checking the "Install" checkbox on the configuration screen. This is not listed in the documentation, but, it does need to be checked.
Hello,
Yes, Install should be checked. Make sure that you have build the solution before all changes. Let me know if the problem still exist.
Kind regards,
Ivan Dimitrov
the Telerik team
I did check the Install checkbox, that's why I hit the breakpoint in the void Install() method of my module. The module obviously installs, but won't show in the admin menu. I also cleaned and rebuilt the solution several times.
Not sure if it will help, but, you could also read this post, I had lots of problems with the install also:
Hello,
Here is a sample code for a module that runs fine at my end. "Install" checkbox should be selected and application restarted. If the module do not appear after the first restart do a second or flush the site map, because we are creating a new node in navigation and the nodes could be still cached.
class
SampleModule : ModuleBase
public
override
Guid LandingPageId
get
return
SampleModule.landingPageId;
public
override
Type[] Managers
get
return
null
;
public
override
void
Initialize(ModuleSettings settings)
base
.Initialize(settings);
public
override
void
Install(Telerik.Sitefinity.Abstractions.SiteInitializer initializer)
base
.Install(initializer);
var _SiteInitializerNode = initializer.PageManager.GetPageNode(SiteInitializer.ModulesNodeId);
var _pageManager = initializer.PageManager;
var sNode = _pageManager.GetPageNodes().Where(p => p.Id == nodeId).SingleOrDefault();
if
(sNode ==
null
)
sNode = initializer.CreatePageNode(nodeId, _SiteInitializerNode);
sNode.Name =
"IvanModule"
;
sNode.ShowInNavigation =
true
;
sNode.Attributes[
"ModuleName"
] =
"IvanModule"
;
sNode.Title =
"IvanModule"
;
sNode.UrlName =
"IvanModule"
;
var id = landingPageId;
var landingPage =
_pageManager.GetPageNodes()
.SingleOrDefault(p => p.Id == landingPageId);
if
(landingPage ==
null
)
var pageInfo =
new
PageElement()
PageId = landingPageId,
Name =
"IvanModuleName"
,
MenuName =
"IvanModuleMenuName"
,
UrlName =
"IvanModuleUrl"
,
Description =
"IvanModuleDesc"
,
HtmlTitle =
"IvanModuleHtmlTitle"
,
IncludeScriptManager =
true
,
ShowInNavigation =
false
,
EnableViewState =
false
,
TemplateName = SiteInitializer.BackendTemplateName
;
var panel =
new
Literal();
initializer.CreatePageFromConfiguration(pageInfo, sNode, panel);
public
static
readonly
Guid landingPageId =
new
Guid(
"597E0C2B-F1D3-4386-BB7F-714C640573B3"
);
public
static
readonly
Guid nodeId =
new
Guid(
"006F8DC0-4576-43AB-BE64-544C21007852"
);