Skip to content

Commit deaa2dd

Browse files
eshanrnhgitbook-bot
authored andcommitted
GITBOOK-22: Updated Adding Icons steps.
1 parent cef92b9 commit deaa2dd

File tree

50 files changed

+354
-410
lines changed

Some content is hidden

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

50 files changed

+354
-410
lines changed
6.26 KB
Loading

16/umbraco-cms/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22
description: Your main resource when building and managing an Umbraco CMS website.
33
cover: .gitbook/assets/Umbraco 16 - Hero.jpg
44
coverY: 0
5-
layout:
6-
cover:
7-
visible: true
8-
size: full
9-
title:
10-
visible: true
11-
description:
12-
visible: true
13-
tableOfContents:
14-
visible: true
15-
outline:
16-
visible: true
17-
pagination:
18-
visible: true
195
---
206

217
# Umbraco CMS Documentation

16/umbraco-cms/customizing/extending-overview/custom-extension-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Custom Extension Types
1+
# Custom Extension types
22

3-
The extension registry is an open system, which can hold any Extension Manifest Type. This article describes how you can declare your types.
3+
The extension registry is an open system, which can hold any Extension Manifest Type. This article describes how you can declare your types.\
44
Types can be declared for re-useability/maintainability or to open up for other package extensions.
55

66
## Manifest Type Declaration

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ The dashboard manifest can contain the following properties:
101101
| elementName | string | (Optional) The name of the Web Component that contains the dashboard (only if not a default export) |
102102
| weight | number | (Optional) The weight of the dashboard, higher numbers are displayed first |
103103
| meta | object | <p>Additional metadata for the dashboard</p><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Label</td><td>string</td><td>The label shown to the user</td></tr><tr><td>pathname</td><td>string</td><td>The routable URL pathname</td></tr></tbody></table> |
104+
| Property | Type | Description |
105+
| Label | string | The label shown to the user |
106+
| pathname | string | The routable URL pathname |
104107
| conditions | array | (Optional) [Conditions](condition.md) for when the dashboard should be displayed |
105108

106109
### Full Example

16/umbraco-cms/customizing/extending-overview/extension-types/workspaces/workspace-context.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const My_COUNTER_CONTEXT = new UmbContextToken<MyContextCounterApi>(
6767
);
6868
```
6969

70-
It is recommended to use `UmbWorkspaceContext` as the Context Alias for your Context Token. This will ensure that the requester only retrieves this Context if it's present at their nearest Workspace Context. Use the Extension Manifest Alias as the API Alias for your Context Token to ensure its unique. For more information, see the [Context API](../../../foundation/working-with-data/context-api.md) article.
70+
It is recommended to use `UmbWorkspaceContext` as the Context Alias for your Context Token. This will ensure that the requester only retrieves this Context if it's present at their nearest Workspace Context. Use the Extension Manifest Alias as the API Alias for your Context Token to ensure its unique. For more information, see the [Context API](../../../foundation/context-api/) article.
7171

7272
## Use the Workspace Context
7373

@@ -133,4 +133,3 @@ Manifest to register this:
133133
],
134134
}
135135
</code></pre>
136-

16/umbraco-cms/customizing/foundation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ The Umbraco element brings what you need to integrate your UI.
1818

1919
Learn about Lit Element, the Web Component Framework that most examples and most of the Backoffice are based upon.
2020

21-
## [Context API](working-with-data/context-api.md)
21+
## [Context API](context-api/)
2222

2323
Learn how to communicate with the rest of the application, whether you want to retrieve data or manipulate it.
2424

25-
## [States — Make reactive UI](working-with-data/states.md)
25+
## [States — Make reactive UI](states.md)
2626

2727
Bring life into your UI by ensuring it's up to date with the current data.
2828

16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
2-
description: The Fetch API is a modern way to make network requests in JavaScript. It provides a more powerful and flexible feature set than the older XMLHttpRequest.
2+
description: >-
3+
The Fetch API is a modern way to make network requests in JavaScript. It
4+
provides a more powerful and flexible feature set than the older
5+
XMLHttpRequest.
36
---
47

58
# Fetch API
@@ -8,12 +11,12 @@ The [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) is a
811

912
## Fetch API in Umbraco
1013

11-
The Fetch API can also be used in Umbraco to make network requests to the server. Since it is built into the browser, you do not need to install any additional libraries or packages to use it. The Fetch API is available in the global scope and can be used directly in your JavaScript code.
14+
The Fetch API can also be used in Umbraco to make network requests to the server. Since it is built into the browser, you do not need to install any additional libraries or packages to use it. The Fetch API is available in the global scope and can be used directly in your JavaScript code.\
1215
The Fetch API is a great way to make network requests in Umbraco because it provides a lot of flexibility. You can use it to make GET, POST, PUT, DELETE, and other types of requests to the server. You can also use it to handle responses in a variety of formats, including JSON, text, and binary data.
1316

1417
### Example
1518

16-
For this example, we are using the Fetch API to make a GET request to the `/umbraco/MyApiController/GetData` endpoint. The response is then parsed as JSON and logged to the console.
19+
For this example, we are using the Fetch API to make a GET request to the `/umbraco/MyApiController/GetData` endpoint. The response is then parsed as JSON and logged to the console.
1720

1821
{% hint style="info" %}
1922
The example assumes that you have a controller set up at the `/umbraco/MyApiController/GetData` endpoint that returns JSON data. You can replace this with your own endpoint as needed. Read more about creating a controller in the [Controllers](../../../implementation/controllers.md) article.
@@ -38,7 +41,6 @@ if (data) {
3841
}
3942
```
4043

41-
4244
{% hint style="warning" %}
4345
When using the Fetch API, you need to manually handle errors and authentication. For most scenarios, we recommend using the Umbraco HTTP Client, which provides built-in error handling and authentication.
4446
{% endhint %}
@@ -47,7 +49,7 @@ When using the Fetch API, you need to manually handle errors and authentication.
4749

4850
When making requests to the Umbraco API controllers, you may need to include an authorization token in the request headers. This is especially important when making requests to endpoints that require authentication.
4951

50-
The Fetch API does not automatically include authentication tokens in requests. You need to manually add the authentication token to the request headers. While you can manage tokens manually, the recommended approach in the Backoffice is to use the **UMB_AUTH_CONTEXT**. This context provides tools to manage authentication tokens and ensures that your requests are properly authenticated.
52+
The Fetch API does not automatically include authentication tokens in requests. You need to manually add the authentication token to the request headers. While you can manage tokens manually, the recommended approach in the Backoffice is to use the **UMB\_AUTH\_CONTEXT**. This context provides tools to manage authentication tokens and ensures that your requests are properly authenticated.
5153

5254
### Example: Using `UMB_AUTH_CONTEXT` for Authentication
5355

@@ -83,19 +85,18 @@ const data = await fetchData(this, '/umbraco/management/api/v1/server/status');
8385
console.log(data);
8486
```
8587
86-
8788
{% hint style="warning" %}
8889
When using the Fetch API with `UMB_AUTH_CONTEXT`, you need to handle token expiration errors manually. If the token is expired, the request will return a 401 error. You will need to refresh the token or prompt the user to log in again.
8990
{% endhint %}
9091
91-
Why Use **UMB_AUTH_CONTEXT**?
92+
Why Use **UMB\_AUTH\_CONTEXT**?
9293
93-
- Simplifies Token Management: Automatically retrieves and refreshes tokens when needed.
94-
- Aligns with Best Practices: Ensures your requests are authenticated in a way that integrates seamlessly with the Backoffice.
95-
- Reduces Errors: Avoids common pitfalls like expired tokens or incorrect headers.
94+
* Simplifies Token Management: Automatically retrieves and refreshes tokens when needed.
95+
* Aligns with Best Practices: Ensures your requests are authenticated in a way that integrates seamlessly with the Backoffice.
96+
* Reduces Errors: Avoids common pitfalls like expired tokens or incorrect headers.
9697
9798
{% hint style="info" %}
98-
The **UMB_AUTH_CONTEXT** is only available in the Backoffice. For external applications, you will need to manage tokens manually or use an API user. Read more about API users in the [API Users](../../../fundamentals/data/users/api-users.md) article.
99+
The **UMB\_AUTH\_CONTEXT** is only available in the Backoffice. For external applications, you will need to manage tokens manually or use an API user. Read more about API users in the [API Users](../../../fundamentals/data/users/api-users.md) article.
99100
{% endhint %}
100101
101102
## Management API Controllers
@@ -112,11 +113,11 @@ You can read more about this concept in the [API Users](../../../fundamentals/da
112113
113114
The Fetch API can also be used to make requests to the Management API using a Backoffice token. This is useful for making requests from custom components that are running in the Backoffice. The concept is similar to the API Users, but the Backoffice token represents the current user in the Backoffice. You will share the access policies of the current user, so you can use the token to make requests on behalf of the current user.
114115
115-
To use the Backoffice access token, you will have to consume the **UMB_AUTH_CONTEXT** context. This context is only available in the Backoffice and includes tools to hook on to the authentication process. You can use the [getOpenApiConfiguration](https://apidocs.umbraco.com/v16/ui-api/classes/packages_core_auth.UmbAuthContext.html#getopenapiconfiguration) method to get a configuration object that includes a few useful properties:
116+
To use the Backoffice access token, you will have to consume the **UMB\_AUTH\_CONTEXT** context. This context is only available in the Backoffice and includes tools to hook on to the authentication process. You can use the [getOpenApiConfiguration](https://apidocs.umbraco.com/v16/ui-api/classes/packages_core_auth.UmbAuthContext.html#getopenapiconfiguration) method to get a configuration object that includes a few useful properties:
116117
117-
- `base`: The base URL of the Management API.
118-
- `credentials`: The credentials to use for the request.
119-
- `token()`: A function that returns the current access token.
118+
* `base`: The base URL of the Management API.
119+
* `credentials`: The credentials to use for the request.
120+
* `token()`: A function that returns the current access token.
120121
121122
Read more about this in the [UmbOpenApiConfiguration](https://apidocs.umbraco.com/v16/ui-api/interfaces/packages_core_auth.UmbOpenApiConfiguration.html) interface.
122123

16/umbraco-cms/customizing/foundation/repositories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Repositories can use different data sources depending on the state of the applic
2424

2525
### Data flow with a repository <a href="#data-flow-with-a-repository" id="data-flow-with-a-repository"></a>
2626

27-
<figure><img src="../../../.gitbook/assets/data-flow.svg" alt=""><figcaption><p>Data flow</p></figcaption></figure>
27+
<figure><img src="../../.gitbook/assets/data-flow.svg" alt=""><figcaption><p>Data flow</p></figcaption></figure>
2828

2929
A repository must be instantiated in the context where it is used. It should take a host element as part of the constructor. This ensures that any contexts consumed in the repository, like notifications or modals, are rendered in the correct DOM context.
3030

16/umbraco-cms/customizing/foundation/states.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ description: >-
88

99
An Umbraco State is a container for a value, it enables you to create [Observables](states.md#observables), which is the name of a hook into the States value — An Observable can then be Observed, such observation provides the current value and if the value of the State changes they will all be updated accordingly.
1010

11-
A typical use case is when you need to implement reactivity across class instances. For example, a State is in a Context and the Observer is a Element. For a concrete example, see the [Extension Type Workspace Context](../../extending-overview/extension-types/workspaces/workspace-context.md) article.
11+
A typical use case is when you need to implement reactivity across class instances. For example, a State is in a Context and the Observer is a Element. For a concrete example, see the [Extension Type Workspace Context](../extending-overview/extension-types/workspaces/workspace-context.md) article.
1212

1313
{% hint style="info" %}
14-
Umbraco States are not relevant when dealing with the reactivity of a Web Component. For that, see the [Lit Element](../lit-element.md) article.
14+
Umbraco States are not relevant when dealing with the reactivity of a Web Component. For that, see the [Lit Element](lit-element.md) article.
1515
{% endhint %}
1616

1717
The example below demonstrates the basics of working with a State and observing its changes:

16/umbraco-cms/customizing/foundation/terminology.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ description: A list of some of the key concepts with working the Umbraco Backoff
77
Understanding certain key concepts is essential when customizing the backoffice. These terminologies can help you decode the purpose of code effectively:
88

99
* **Repository:** An API that enables communication with a server.
10-
* **State:** A reactive container holding data, when data is changed, all its Observables will be notified. You can read more about states and observables in the [States](working-with-data/states.md) article.
10+
* **State:** A reactive container holding data, when data is changed, all its Observables will be notified. You can read more about states and observables in the [States](states.md) article.
1111
* **Observable:** An observable is the hook for others to subscribe to the data of a State.
1212
* **Observe:** Observe describes what we do when subscribing to an Observable.
13-
* **Context-API:** The name used to serve APIs (instances/classes) for a certain context in the DOM. An API that is served via the Context-API is called a Context. You can read more about this in the [Context API](working-with-data/context-api.md) article.
13+
* **Context-API:** The name used to serve APIs (instances/classes) for a certain context in the DOM. An API that is served via the Context-API is called a Context. You can read more about this in the [Context API](context-api/) article.
1414
* **Context Provider:** Enables providing a class instance as a Context API.
1515
* **Context Consumer:** Enables the consumption of a Context API.
1616
* **Controller:** An abstract term for a thing that hooks into the lifecycle of an element. Many things in our system are Controllers.

0 commit comments

Comments
 (0)