-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/patrickdemooij9/uSeoToolkit…
- Loading branch information
Showing
4 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/SeoToolkit.Umbraco.Common.Core/Controllers/InfoTreeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Core.Events; | ||
using Umbraco.Cms.Core.Services; | ||
using Umbraco.Cms.Core.Trees; | ||
using Umbraco.Cms.Web.BackOffice.Trees; | ||
|
||
namespace SeoToolkit.Umbraco.Common.Core.Controllers | ||
{ | ||
//This controller is only here to prevent single node trees if you only download one package | ||
[Tree("SeoToolkit", "info", TreeTitle = "Info", TreeGroup = "SeoToolkit", SortOrder = 99)] | ||
public class InfoTreeController : TreeController | ||
{ | ||
public InfoTreeController(ILocalizedTextService localizedTextService, UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection, IEventAggregator eventAggregator) : base(localizedTextService, umbracoApiControllerTypeCollection, eventAggregator) | ||
{ | ||
} | ||
|
||
protected override ActionResult<TreeNode> CreateRootNode(FormCollection queryStrings) | ||
{ | ||
var root = base.CreateRootNode(queryStrings); | ||
|
||
root.Value.Icon = "icon-info"; | ||
root.Value.HasChildren = false; | ||
root.Value.RoutePath = $"SeoToolkit"; | ||
root.Value.MenuUrl = null; | ||
|
||
return root.Value; | ||
} | ||
|
||
protected override ActionResult<TreeNodeCollection> GetTreeNodes(string id, FormCollection queryStrings) | ||
{ | ||
return TreeNodeCollection.Empty; | ||
} | ||
|
||
protected override ActionResult<MenuItemCollection> GetMenuForNode(string id, FormCollection queryStrings) | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/SeoToolkit.Umbraco.Common.Core/SeoToolkit.Umbraco.Common.Core.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/SeoToolkit.Umbraco.ScriptManager.Core/Controllers/ScriptManagerTreeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters