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
-- Variables -- | |
DECLARE @memberGroup VARCHAR(100) = 'PORTAL MEMBER' | |
DECLARE @memberGroupIntId INT | |
DECLARE @nodeId INT | |
-- Get the INT ID of the member group that is called 'Portal Member' -- | |
SELECT @memberGroupIntId = [id] | |
FROM [dbo].[umbracoNode] | |
WHERE nodeObjectType = '366E63B9-880F-4E13-A61C-98069B029728' -- This GUID is for member groups -- |
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
//Display an Umbraco message bubble notification bottom right from JavaScript | |
//.showNotifications() takes a JSON object so an AJAX could return this JSON for notification bubble | |
//Success | |
$u.Sys.NotificationManager.getInstance().showNotifications([{ title: 'Hey!', message: 'Hello There', type: 'success'}]); | |
//Info | |
$u.Sys.NotificationManager.getInstance().showNotifications([{ title: 'Some info', message: 'I have something to say', type: 'info'}]); | |
//Error |
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
{ | |
"$schema" : "./appsettings-schema.json", | |
"Serilog": { | |
"MinimumLevel": { | |
"Default": "Information", | |
"Override": { | |
"Examine.Lucene.Providers.LuceneIndex": "Debug", | |
"Examine.BaseIndexProvider": "Debug", | |
"Examine.Lucene.LoggingReplicationClient": "Debug", | |
"Examine.Lucene.ExamineReplicator": "Debug" |
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.Net.Http.Headers; | |
using Umbraco.Cms.Core.Composing; | |
namespace StaticAssets | |
{ | |
public class StaticAssetsHeaders : IComposer | |
{ | |
public void Compose(IUmbracoBuilder builder) | |
{ | |
builder.Services.Configure<StaticFileOptions>(options => |
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
{ | |
"$schema": "./umbraco/config/appsettings-schema.json", | |
"Umbraco": { | |
// NOTE: Other settings removed in this example for clarity | |
"CMS": { | |
"RichTextEditor": { | |
"CustomConfig": { | |
"forced_root_block": "" | |
} | |
} |
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 Umbraco.Core.Scoping; | |
namespace My.Website | |
public class DatabaseExample | |
{ | |
private IScopeProvider _scopeProvider; | |
public DatabaseExample(IScopeProvider scopeProvider) | |
{ | |
_scopeProvider = scopeProvider; |
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.Identity; | |
using Umbraco.Cms.Core.Security; | |
using Umbraco.Cms.Core.Services; | |
using Umbraco.Extensions; | |
namespace Umbraco.Cms.Web.UI.NetCore | |
{ | |
public class MyCustomIdentityErrorDescriber : BackOfficeErrorDescriber | |
{ | |
private ILocalizedTextService _textService; |
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
winget install --id=Spotify.Spotify -e ; | |
winget install --id=Microsoft.WindowsTerminal -e ; | |
winget install --id=Microsoft.VisualStudioCode -e ; | |
winget install --id=7zip.7zip -e ; | |
winget install --id=Microsoft.AzureStorageExplorer -e ; | |
winget install --id=ScooterSoftware.BeyondCompare4 -e ; | |
winget install --id=Google.Chrome -e ; | |
winget install --id=Dropbox.Dropbox -e ; | |
winget install --id=Git.Git -e ; | |
winget install --id=Insomnia.Insomnia -e ; |
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 Umbraco.Cms.Core.Events; | |
using Umbraco.Cms.Infrastructure.Services.Notifications; | |
namespace TestingEvents | |
{ | |
public class DontShout : INotificationHandler<ContentPublishingNotification> | |
{ | |
public void Handle(ContentPublishingNotification notification) | |
{ | |
foreach (var node in notification.PublishedEntities) |
NewerOlder