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
-- Copied from Hendy https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/72814-creating-a-list-of-unused-doc-types#comment-233729 | |
-- Find all unused docTypes | |
-- These results may contain docTypes that are masters of used ones, so need to exclude these too... | |
SELECT | |
A.nodeId as 'DocTypeId', | |
B.text AS 'Name', | |
A.alias AS 'Alias' | |
FROM | |
cmsContentType A LEFT JOIN |
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
public class DefaultController : RenderMvcController | |
{ | |
[UmbracoDonutOutputCache(CacheProfile = "LongPageCache", | |
Options = OutputCacheOptions.NoCacheLookupForPosts & | |
OutputCacheOptions.ReplaceDonutsInChildActions, Order = 100)] | |
public override ActionResult Index(RenderModel model) | |
{ | |
return base.Index(model); | |
} | |
} |
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
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.ViewEngines; | |
using Microsoft.Extensions.Logging; | |
using Umbraco.Cms.Core.Models; | |
using Umbraco.Cms.Core.Web; | |
using Umbraco.Cms.Web.Common.Controllers; | |
using Umbraco.Cms.Web.Common.PublishedModels; |
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
$credentials="<github_access_token>" | |
$repo = "<user_or_org>/<repo_name>" | |
$file = "<name_of_asset_file>" | |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$headers.Add("Authorization", "token $credentials") | |
$releases = "https://api.github.com/repos/$repo/releases" | |
Write-Host Determining latest release | |
$id = ((Invoke-WebRequest $releases -Headers $headers | ConvertFrom-Json)[0].assets | where { $_.name -eq $file })[0].id |
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
/* | |
* | |
* This uses https://github.com/dawoe/24-days-block-list-article/blob/develop/24Days.Core/Controllers/BlockPreviewApiController.cs | |
* as a base to follow all I did was change it from Partial views to ViewComponents. Yet to check if I can register the ViewComponentHelper instead of the cast. | |
* You will also need the App_Plugins from Dave's repo. | |
*/ | |
using System; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; |