Skip to content

Instantly share code, notes, and snippets.

View nul800sebastiaan's full-sized avatar
🔥

Sebastiaan Janssen nul800sebastiaan

🔥
View GitHub Profile
@nul800sebastiaan
nul800sebastiaan / custom.element.ts
Last active October 15, 2025 07:37 — forked from Rockerby/custom.element.ts
A small example of how to create a custom element to be placed within the Workspace Action part for Umbraco 15+. This takes the existing element that is placed there and adds an icon in the button.
/*
* This file is a copy of the core version from https://github.com/umbraco/Umbraco-CMS/blob/6bca91a52fabfe96b7ede1837b908b33d78136ed/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.ts
* with the addition of a document icon in the button!
*/
import type {
ManifestWorkspaceAction,
ManifestWorkspaceActionMenuItem,
MetaWorkspaceActionDefaultKind,
UmbWorkspaceActionDefaultKind,
@helper RenderCountryOptions() {
<option>Choose a country...</option>
@foreach(var region in @Model.XPath("/root/Website/CountryList/CountryList[Country[not(active = 0)]]"))
{
<optgroup label="@region.Name">
@foreach(var country in @region.Children)
{
<option>@country.Name</option>
}
</optgroup>