Skip to content

Commit 31f5d23

Browse files
authored
Merge branch 'umbraco:main' into feature/7490_context_api
2 parents 81f4c3d + f629495 commit 31f5d23

File tree

51 files changed

+596
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+596
-143
lines changed

13/umbraco-engage/getting-started/for-developers/troubleshooting-installations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The most common reasons for this are:
1616

1717
* Database connectivity issues.
1818
* Incompatible SQL Server version.
19-
* No COLUMNS STORE index support on Azure SQL lower than S3.
19+
* No columnstore index support on Azure SQL lower than S3.
2020

2121
### Exception
2222

@@ -41,7 +41,7 @@ await app.BootUmbracoAsync();
4141

4242
#### When having database connectivity issues
4343

44-
1. Remove the row with the `Umbraco.Core.Upgrader.State+Umbraco.Engage` key from the `umbracoKeyValue` table in the database if it exists. 
44+
1. Remove the row with the `Umbraco.Core.Upgrader.State+Umbraco.Engage` key from the `umbracoKeyValue` table in the database if it exists.
4545
2. Remove all existing umbracoEngage\* tables from the database if they exist.
4646
3. Restart the site.
4747

@@ -51,10 +51,10 @@ await app.BootUmbracoAsync();
5151
When running Azure SQL on lower tiers and querying columnstore indexes, performance may decrease. Depending on the amount of data being processed, this can also lead to timeouts. This configuration is not recommended for production environments.
5252
{% endhint %}
5353

54-
Azure SQL lower than S3 doesn't support creating COLUMN STORE indexes. To work around this follow these steps: 
54+
Azure SQL lower than S3 doesn't support creating columnstore indexes. To work around this follow these steps:
5555

5656
1. Scale your Azure SQL environment to S3.
5757
2. Restart the site.
5858
3. Scale back to your initial Azure SQL tier.
5959

60-
The columnstore indexes are created and can be used in a lower tier.
60+
The columnstore indexes are created and can be used in a lower tier.

16/umbraco-cms/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@
188188
* [Workspace Context](customizing/extending-overview/extension-types/workspaces/workspace-context.md)
189189
* [Workspace Views](customizing/extending-overview/extension-types/workspaces/workspace-views.md)
190190
* [Workspace Footer Apps](customizing/extending-overview/extension-types/workspaces/workspace-footer-apps.md)
191+
* [Collections](customizing/extending-overview/extension-types/collections/README.md)
192+
* [Collection View](customizing/extending-overview/extension-types/collections/collection-view.md)
191193
* [Extension Kind](customizing/extending-overview/extension-kind.md)
192194
* [Extension Conditions](customizing/extending-overview/extension-conditions.md)
193195
* [Custom Extension types](customizing/extending-overview/custom-extension-type.md)

16/umbraco-cms/customizing/extending-overview/extension-types/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The `backofficeEntryPoint` extension type is used to execute JavaScript upon ini
2323

2424
### [Block Custom View](block-custom-view.md)
2525

26-
The `blockEditorCustomView` extension type is used to define a custom web component for representing blocks inside the Umbraco block grid property editor.
26+
The `blockEditorCustomView` extension type is used to define a custom web component for representing blocks inside the Umbraco block property editor.
2727

2828
### [Bundle](bundle.md)
2929

@@ -94,6 +94,7 @@ The `tree` extension type is used to create a hierarchical structure composed of
9494
The `workspace` extension type provides functionality that operates within specific workspace environments, such as document editing, media management, or member editing.
9595

9696
### [Property Editor UIs](../../../reference/property-editor-uis/README.md)
97+
9798
The `PropertyEditorUi` extension type allows you to create custom property editors in the Umbraco backoffice.
9899
See the [guide on how to work with and create property editors](../../../customizing/property-editors/README.md) for more information on how to implement this type of extension.
99100

16/umbraco-cms/customizing/extending-overview/extension-types/backoffice-entry-point.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ import '/App_Plugins/YourFolder/global.css';
125125

126126
It is recommended to make use of the Type intellisense that we provide.
127127

128-
When writing your Manifest in TypeScript, you should use the `UmbExtensionManifest` type. Read the [TypeScript setup](broken-reference/) article to make sure you have Types correctly configured.
128+
When writing your Manifest in TypeScript, you should use the `UmbExtensionManifest` type. Read the [TypeScript setup](../../../customizing/development-flow/README.md#typescript-setup) article to make sure you have Types correctly configured.
129129

130130
{% code title="index.ts" %}
131131
```typescript
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
description: >-
3+
Learn how to create a Collection View that defines how data is displayed within a collection in Umbraco.
4+
---
5+
6+
## Purpose
7+
Use a Collection View when you need to:
8+
- Present data in a structured or visual way (for example, table, cards, grid)
9+
- Customize how entity fields are displayed
10+
11+
## Create a Collection View
12+
13+
{% hint style="info" %}
14+
Before creating a Collection View, make sure you are familiar with the [Extension Registry in Umbraco](../../../../customizing/extending-overview/extension-registry/register-extensions.md).
15+
{% endhint %}
16+
17+
### Manifest
18+
{% code title="umbraco-package.json" %}
19+
```json
20+
{
21+
"type": "collectionView",
22+
"alias": "My.CollectionView.Alias",
23+
"name": "My Collection View",
24+
"element": "/App_Plugins/my-collection-view/my-collection-view.js",
25+
"meta": {
26+
"label": "Table",
27+
"icon": "icon-list",
28+
"pathName": "table"
29+
},
30+
"conditions": [
31+
{
32+
"alias": "Umb.Condition.CollectionAlias",
33+
"match": "Umb.Collection.Document" // Type of entity to display in this collection view
34+
}
35+
]
36+
}
37+
```
38+
{% endcode %}
39+
40+
### Implementation
41+
42+
Implement your Collection View as a Lit element that extends `UmbLitElement`.
43+
This defines how a list of entities is rendered in your collection.
44+
45+
{% code title="my-collection-view.ts" %}
46+
```typescript
47+
import { css, customElement, html, state } from '@umbraco-cms/backoffice/external/lit';
48+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
49+
import { UMB_DOCUMENT_COLLECTION_CONTEXT } from '@umbraco-cms/backoffice/document';
50+
import type { UmbDocumentCollectionItemModel } from '@umbraco-cms/backoffice/document';
51+
import type { UmbCollectionColumnConfiguration } from '@umbraco-cms/backoffice/collection';
52+
53+
@customElement('my-document-table-collection-view')
54+
export class MyDocumentTableCollectionViewElement extends UmbLitElement {
55+
56+
@state() private _columns: Array<{ name: string; alias: string; align?: string }> = [];
57+
@state() private _items?: Array<UmbDocumentCollectionItemModel> = [];
58+
59+
constructor() {
60+
super();
61+
62+
this.consumeContext(UMB_DOCUMENT_COLLECTION_CONTEXT, (collectionContext) => {
63+
collectionContext?.setupView(this);
64+
65+
this.observe(collectionContext?.userDefinedProperties, (props) => {
66+
this.#createColumns(props);
67+
});
68+
69+
this.observe(collectionContext?.items, (items) => {
70+
this._items = items;
71+
});
72+
});
73+
}
74+
75+
#createColumns(userProps: Array<UmbCollectionColumnConfiguration> = []) {
76+
const baseCols = [
77+
{ name: 'Name', alias: 'name' },
78+
{ name: 'State', alias: 'state' },
79+
];
80+
const userCols = userProps.map((p) => ({
81+
name: p.nameTemplate ?? p.alias,
82+
alias: p.alias,
83+
}));
84+
this._columns = [...baseCols, ...userCols, { name: '', alias: 'entityActions', align: 'right' }];
85+
}
86+
87+
override render() {
88+
if (this._items === undefined) return html`<p>Not found...</p>`;
89+
return html`
90+
<table>
91+
<thead>
92+
<tr>
93+
${this._columns.map((col) => html`<th style="text-align:${col.align ?? 'left'}">${col.name}</th>`)}
94+
</tr>
95+
</thead>
96+
<tbody>
97+
${this._items.map(
98+
(item) => html`
99+
<tr>
100+
${this._columns.map((col) => {
101+
switch (col.alias) {
102+
case 'name':
103+
return html`<td><a href="#">${item.name}</a></td>`;
104+
case 'state':
105+
return html`<td>${item.state}</td>`;
106+
case 'sortOrder':
107+
return html`<td>${item.sortOrder}</td>`;
108+
case 'updateDate':
109+
return html`<td>${item.updateDate}</td>`
110+
case 'creator':
111+
return html`<td>${item.creator}</td>`;
112+
case 'entityActions':
113+
return html`<td style="text-align:right;">⋮</td>`;
114+
default:
115+
const val = item.values.find((v) => v.alias === col.alias)?.value ?? '';
116+
return html`<td>${val}</td>`;
117+
}
118+
})}
119+
</tr>
120+
`
121+
)}
122+
</tbody>
123+
</table>
124+
`;
125+
}
126+
127+
static override styles = css`
128+
:host {
129+
display: block;
130+
width: 100%;
131+
overflow-x: auto;
132+
font-family: sans-serif;
133+
}
134+
table {
135+
width: 100%;
136+
border-collapse: collapse;
137+
}
138+
th,
139+
td {
140+
padding: 6px 10px;
141+
border: 1px solid #ddd;
142+
white-space: nowrap;
143+
}
144+
th {
145+
background: #f8f8f8;
146+
font-weight: 600;
147+
}
148+
a {
149+
color: var(--uui-color-interactive, #0366d6);
150+
text-decoration: none;
151+
}
152+
a:hover {
153+
text-decoration: underline;
154+
}
155+
`;
156+
}
157+
158+
export default MyDocumentTableCollectionViewElement;
159+
160+
declare global {
161+
interface HTMLElementTagNameMap {
162+
'my-document-table-collection-view': MyDocumentTableCollectionViewElement;
163+
}
164+
}
165+
```
166+
{% endcode %}
167+
168+
### Common Collection Match Values
169+
170+
Use the `match` property in your manifest to target a specific collection type.
171+
| **Match Value** | **Description** |
172+
|------------------|-----------------|
173+
| `Umb.Collection.Document` | Targets the **Document** collection (content items). |
174+
| `Umb.Collection.Media` | Targets the **Media** collection (images, videos, files). |
175+
| `Umb.Collection.Member` | Targets the **Member** collection. |
176+
| `Umb.Collection.MemberGroup` | Targets the **Member Group** collection. |
177+
| `Umb.Collection.User` | Targets the **User** collection. |
178+
| `Umb.Collection.UserGroup` | Targets the **User Group** collection. |
179+
| `Umb.Collection.Dictionary` | Targets the **Dictionary** collection. |
180+

16/umbraco-cms/extending/packages/creating-a-package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Additionally, the `.csproj` file is configured to support NuGet packaging, allow
112112
Since the `umbraco-extension` template does not generate an `App_Plugins` folder by default, you will need to manually create it.
113113

114114
1. Create an `App_Plugins` folder in the downloaded package folder.
115-
2. Go to the `welcome-dashboard` folder created in the [Creating a Custom Dashboard Tutorial](../../tutorials/creating-a-custom-dashboard/#setting-up-a-package).
115+
2. Go to the `welcome-dashboard` folder created in the [Creating a Custom Dashboard Tutorial](../../tutorials/creating-a-custom-dashboard/README.md#setting-up-a-package).
116116
3. Transfer or copy the `welcome-dashboard` folder in the `App_Plugins` folder.
117117

118118
![App\_Plugins with dashboard files](images/app-plugins-content.png)

16/umbraco-cms/fundamentals/backoffice/property-editors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The following Property Editors have been removed with the release of Umbraco 14:
1616
* Grid Layout
1717
* Nested content
1818

19-
We recommend using the [Block Editor](built-in-umbraco-property-editors/block-editor/) or the [Rich Text Editor Blocks](broken-reference) instead.
19+
We recommend using the [Block Editor](built-in-umbraco-property-editors/block-editor/README.md) or the [Rich Text Editor Blocks](built-in-umbraco-property-editors/rich-text-editor/README.md) instead.
2020
{% endhint %}
2121

2222
When creating a Data Type, specify the property editor for the Data Type to use by selecting from the "Property editor" list (as shown below).

16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The Data Type editor allows you to configure the following properties:
5151

5252
## Setup Block Types
5353

54-
Block Types are based on [**Element Types**](../../../../data/defining-content/#element-types). These can be created beforehand or while setting up your Block Types.
54+
Block Types are based on [**Element Types**](../../../../data/defining-content/default-document-types.md#element-type). These can be created beforehand or while setting up your Block Types.
5555

5656
Once you have added an Element Type as a Block Type on your Block Grid Data Type you have the option to configure it.
5757

@@ -197,8 +197,8 @@ The Block is resized using a click-and-drag feature. Moving the mouse will chang
197197

198198
Rendering the stored value of your **Block Grid** property editor can be done in two ways:
199199

200-
1. [Default rendering](block-grid-editor.md#1-default-rendering)
201-
2. [Build your own rendering](block-grid-editor.md#2-build-your-own-rendering)
200+
1. [Default rendering](#1-default-rendering)
201+
2. [Build your own rendering](#2-build-custom-rendering)
202202

203203
### 1. Default rendering
204204

16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-list-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
This article is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
1111
{% endhint %}
1212

13-
**Block List** is a list editing property editor, using [Element Types](../../../../data/defining-content/#element-types) to define the list item schema.
13+
**Block List** is a list editing property editor, using [Element Types](../../../../data/defining-content/default-document-types.md#element-type) to define the list item schema.
1414

1515
{% hint style="info" %}
1616
The _Block List_ replaces the obsolete _Nested Content_ editor.

16/umbraco-cms/fundamentals/data/content-version-cleanup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The feature can be configured in the `appSettings.json`:
3939
}
4040
```
4141

42-
For sites with stricter requirements, it is possible to opt-out of both options globally, see [ContentSettings](../../reference/configuration/contentsettings.md#contentversioncleanuppolicy) and by Document Type.
42+
For sites with stricter requirements, it is possible to opt-out of both options globally, see [ContentSettings](../../reference/configuration/contentsettings.md#content-version-cleanup-policy) and by Document Type.
4343

4444
Additionally, it is possible to keep the feature enabled but mark specific versions to keep forever.
4545

0 commit comments

Comments
 (0)