Episode 9

Umbraco 13 Tutorial - Episode 9 - Tips and Tricks

Code

Freelancer.csproj

<PackageReference Include="Our.Umbraco.TheDashboard" Version="13.0.1" />
<PackageReference Include="Skybrud.Umbraco.Redirects" Version="13.0.4" />
<PackageReference Include="uSync" Version="13.2.4" />

Freelancer.csproj

DashboardsComposer.cs

using Our.Umbraco.TheDashboard.Counters.Implement;
using Our.Umbraco.TheDashboard.Extensions;

using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Dashboards;

namespace Freelancer.Composers;

public class DashboardsComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        builder.Dashboards().Remove<ContentDashboard>();
        builder.TheDashboardCounters().Remove<MembersTotalDashboardCounter>()
            .Remove<MembersNewLastWeekDashboardCounter>();
    }
}

DashboardsComposer.cs

en.xml

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<language alias="en" intName="English (UK)" localName="English (UK)" lcid="" culture="en-GB">
  <area alias="dashboardTabs">
    <key alias="redirects">Manual Redirects</key>
    <key alias="Skybrud.Umbraco.Redirects">Manual Redirects</key>
  </area>
  <area alias="redirects">
    <key alias="redirects">Manual Redirects</key>
  </area>
</language>

en.xml

en-US.xml

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<language alias="en_us" intName="English (US)" localName="English (US)" lcid="" culture="en-US">
  <area alias="dashboardTabs">
    <key alias="redirects">Manual Redirects</key>
    <key alias="Skybrud.Umbraco.Redirects">Manual Redirects</key>
  </area>
  <area alias="redirects">
    <key alias="redirects">Manual Redirects</key>
  </area>
</language>

en-US.xml

en.user.xml

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<language alias="en" intName="English (UK)" localName="English (UK)" lcid="" culture="en-GB">
  <area alias="redirectUrls">
    <key alias="redirectUrlManagement">Automatic Redirects</key>
  </area>
  <area alias="dashboardTabs">
    <key alias="contentRedirectManager">Automatic Redirects</key>
  </area>
</language>

en.user.xml

en-US.user.xml

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<language alias="en_us" intName="English (US)" localName="English (US)" lcid="" culture="en-US">
  <area alias="redirectUrls">
    <key alias="redirectUrlManagement">Automatic Redirects</key>
  </area>
  <area alias="dashboardTabs">
    <key alias="contentRedirectManager">Automatic Redirects</key>
  </area>
</language>

en-US.user.xml

reusableContent.cshtml

@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem<ContentModels.ReusableContent>>

@{
    if (Model?.Content?.ContentItem is null) return;
}

@await Html.GetBlockGridHtmlAsync(Model.Content.ContentItem, "mainContent")

usync appsettings.json

,
  "uSync": {
    "Settings": {
      "ExportOnSave": "Settings"
    }
  }

usync appsettings.json

LoginBackgroundImage appsettings.json

,
"LoginBackgroundImage": "/img/login-background-image.jpg"

LoginBackgroundImage appsettings.json