Skip to content

Commit 1b16548

Browse files
authored
Merge pull request #6876 from umbraco/cms/release/13.8
Umbraco 13.8 release documentation updates
2 parents cbd1c02 + aae6f87 commit 1b16548

File tree

4 files changed

+54
-10
lines changed

4 files changed

+54
-10
lines changed

13/umbraco-cms/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@
353353
* [TextService](reference/management/services/textservice.md)
354354
* [ContentService](reference/management/services/contentservice/README.md)
355355
* [Create content programmatically](reference/management/services/contentservice/create-content-programmatically.md)
356+
* [Publish content programmatically](reference/management/services/contentservice/publish-content-programmatically.md)
356357
* [ContentTypeService](reference/management/services/contenttypeservice/README.md)
357358
* [Retrieving content types](reference/management/services/contenttypeservice/retrieving-content-type-containers.md)
358359
* [Retrieving content types](reference/management/services/contenttypeservice/retrieving-content-types.md)

13/umbraco-cms/reference/configuration/contentsettings.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ The following snippet will give an overview of the keys and values in the conten
4747
"PreviewBadge": "<![CDATA[<b>My HTML here</b>]]>",
4848
"ResolveUrlsFromTextString": false,
4949
"ShowDeprecatedPropertyEditors": false,
50-
"ShowDomainWarnings": true
50+
"ShowDomainWarnings": true,
51+
"ShowUnroutableContentWarnings": true
5152
}
5253
}
5354
}
@@ -174,15 +175,23 @@ This setting is used for controlling whether or not the Data Types marked as obs
174175

175176
By default this is set to `false`. To make the obsolete data types visible in the dropdown change the value to `true`.
176177

177-
### Show Domain Warnings
178+
### Show domain warnings
178179

179180
If you do not configure Domains for each language in a multilingual site then every time you publish your content you get this warning:
180181

181182
`Content published: Domains are not configured for multilingual site, please contact an administrator, see log for more information.`
182183

183184
If you have a use case for not setting the domains, you can set this setting **ShowDomainWarnings** to `false` to stop the warning from displaying.
184185

185-
## ContentVersionCleanupPolicy
186+
### Show unroutable content warnings
187+
188+
If your routing setup leads to more than one document having the same URL, on publish a warning will be displayed:
189+
190+
`Content published: The document does not have a URL, possibly due to a naming collision with another document. More details can be found under Info.`
191+
192+
To suppress these warnings, set this option to `false`.
193+
194+
## Content version cleanup policy
186195

187196
The global settings for the scheduled job which cleans historic content versions. These settings can be overridden per Document Type.
188197

@@ -200,19 +209,19 @@ See [Content Version Cleanup](../../fundamentals/data/content-version-cleanup.md
200209

201210
To retain only the current draft and published version, set both the "keep" settings values to 0. The next time the scheduled job runs (hourly) all non-current versions (except those marked "prevent cleanup") will be removed.
202211

203-
### EnableCleanup
212+
### Enable cleanup
204213

205214
When set to `true`, a scheduled job will delete historic content versions that are not retained according to the policy every hour.
206215

207216
When set to `false`, the scheduled job will not delete any content versions, regardless of any overridden settings for a Document Type.
208217

209218
The dotnet new template provides an `appsettings.json` file with the default value set to `true` for all sites.
210219

211-
### KeepAllVersionsNewerThanDays
220+
### Keep all versions newer than days
212221

213222
All versions that fall in this period will be kept.
214223

215-
### KeepLatestVersionPerDayForDays
224+
### Keep latest version per day for days
216225

217226
For content versions that fall in this period, the most recent version for each day is kept. All previous versions for that day are removed unless marked as preventCleanup.
218227

@@ -237,11 +246,11 @@ This section is used for managing how Umbraco handles images, allowed attributes
237246

238247
Let's break it down.
239248

240-
### ImageFileTypes
249+
### Image file types
241250

242251
This is a separated list of accepted image formats
243252

244-
### AutoFillImageProperties
253+
### Auto fill image properties
245254

246255
You can define what properties should be automatically updated when an image is being uploaded. This means that if you decide to rename the default **umbracoWidth** and **umbracoHeight** properties the values in **`"WidthFieldAlias"`** and **`"HeightFieldAlias"`** need to be updated. This needs to happen in order to automatically populate the values when the image is being uploaded.
247256

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Publishing content programmatically
2+
3+
The ContentService is also used for publishing operations.
4+
5+
The following example shows a page being published with all descendants.
6+
7+
```csharp
8+
using Umbraco.Cms.Core.Models;
9+
using Umbraco.Cms.Core.Services;
10+
11+
namespace Umbraco.Cms.Web.UI.Custom;
12+
13+
public class PublishContentDemo
14+
{
15+
private readonly IContentService _contentService;
16+
17+
public PublishContentDemo(IContentService contentService) => _contentService = contentService;
18+
19+
public void Publish(Guid key)
20+
{
21+
IContent? content = _contentService.GetById(key)
22+
?? throw new InvalidOperationException($"Could not find content with key: {key}.");
23+
24+
_contentService.SaveAndPublishBranch(content, PublishBranchFilter.Default);
25+
}
26+
}
27+
```
28+
29+
The `PublishBranchFilter` option can include one or more of the following flags:
30+
31+
- `Default` - publishes existing published content with pending changes.
32+
- `IncludeUnpublished` - publishes unpublished content and existing published content with pending changes.
33+
- `ForceRepublish` - publishes existing published content with or without pending changes.
34+
- `All` - combines `IncludeUnpublished` and `ForceRepublish`.
35+

13/umbraco-cms/tutorials/editors-manual/getting-started-with-umbraco/creating-saving-and-publishing-content.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ To publish the node with descendants, follow these steps:
6565
3. Select **Publish with descendants**.
6666

6767
![Publish with descendants](../../../../../10/umbraco-cms/tutorials/editors-manual/getting-started-with-umbraco/images/Publish-with-descendants-v9.png)
68-
4. Toggle the option to **Include unpublished content items** if you wish to. This option includes all unpublished content items for the selected page and the available linked pages.
69-
68+
4. Toggle the option to **Include unpublished content items** if you wish to. This option includes all unpublished content items for the selected page and the descendant pages.
7069
![Publish with descendants](../../../../../10/umbraco-cms/tutorials/editors-manual/getting-started-with-umbraco/images/Publish-with-descendants2-v9.png)
7170

7271
#### 3: Unpublish

0 commit comments

Comments
 (0)