Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi.
I am trying to setup a custom section in Umbraco 7. I have done this before in Umbraco 6, but it seems something is not right?
I have created my application and three controller. What I try to accumplish is a simple "front page", for my custom section.
First thing first. This i my Application:
[Application("Statistic", "Statistics", "icon-lab", 15)] public class CustomSectionApplication : IApplication { }
Then I have created the following simple three controller:
[PluginController("Statistics")] [Tree("Statistic", "StatisticsTree", "Statistics", iconClosed: "icon-doc")] public class StatisticsSectionTreeController : TreeController { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { var controller = new StatisticAuthApiController(); var nodes = new TreeNodeCollection(); var bannerStats = controller.GetAll(); //var bannerNodes = bannerStats.Select(a => CreateTreeNode(a.Id.ToString(), null, queryStrings, a.Name, "icon-user", false)); //nodes.AddRange(bannerNodes); return nodes; } protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) { //return null; var menu = new MenuItemCollection(); menu.Items.Add<ActionNew>("Opret"); menu.Items.Add<ActionRefresh>("Opdater"); return menu; } protected override TreeNode CreateRootNode(FormDataCollection queryStrings) { // routepath HAS to be /appsection/treealias/htmlview/ID var route = "/Statistic/StatisticsTree/index/0"; return CreateTreeNode("0", "Statistic", queryStrings, "Statistik", "icon-server", false, route); } }
I have a index.html position under:
"App_Plugins\Statistic\backoffice\StatisticsTree\index.html"
I have also tried to test the location with making a create view, which are loaded correct by Umbraco.
For further information I have the following entry in applications.config:
<add alias="Statistic" name="Statistics" icon="icon-lab" sortOrder="15" />
And in threes.config:
<add initialize="true" sortOrder="0" alias="StatisticsTree" application="Statistic" title="Statistics" iconClosed="icon-doc" iconOpen="icon-folder-open" type="UmbracoKenneth.Kenneth.StatisticsSectionTreeController, UmbracoKenneth" />
Can anyone help me where the problem is?
Hi Dennis, I think what you want is to create a dashboard, see the link below.
https://our.umbraco.org/documentation/Tutorials/Creating-a-Custom-Dashboard/
// Herman
Hi Cimplex.
This is almost what I wont. But how do I add a dashboard as a front page, for my custom section?
Thanks!
Hi Dennis, Follow the tutorial and create a view in you app_plugins folder for your custom section, and in the dashboard.config file edit it to something like this:
<section alias="Custom Welcome Dashboard"> <access> <deny>translator</deny> </access> <areas> <area>Statistic</area> </areas> <tab caption="Welcome"> <control> /app_plugins/CustomWelcomeDashboard/WelcomeDashboard.html </control> </tab> </section>
But replace the file path to your own.
If im not totaly wrong you should have Statistic in the area tag but you can also try "StatisticsTree"
It can help to touch the web.config to force umbraco to reload cache.
YES!
I just read it more detailed! Sorry the morning coffee helped clear it!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
"Front page" in custom section
Hi.
I am trying to setup a custom section in Umbraco 7. I have done this before in Umbraco 6, but it seems something is not right?
I have created my application and three controller. What I try to accumplish is a simple "front page", for my custom section.
First thing first. This i my Application:
Then I have created the following simple three controller:
I have a index.html position under:
I have also tried to test the location with making a create view, which are loaded correct by Umbraco.
For further information I have the following entry in applications.config:
And in threes.config:
Can anyone help me where the problem is?
Hi Dennis, I think what you want is to create a dashboard, see the link below.
https://our.umbraco.org/documentation/Tutorials/Creating-a-Custom-Dashboard/
// Herman
Hi Cimplex.
This is almost what I wont. But how do I add a dashboard as a front page, for my custom section?
Thanks!
Hi Dennis, Follow the tutorial and create a view in you app_plugins folder for your custom section, and in the dashboard.config file edit it to something like this:
But replace the file path to your own.
If im not totaly wrong you should have Statistic in the area tag but you can also try "StatisticsTree"
It can help to touch the web.config to force umbraco to reload cache.
// Herman
YES!
I just read it more detailed! Sorry the morning coffee helped clear it!
Thanks!
is working on a reply...