Skip to content

gregwiechec/bulk-edit-documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Bulk Edit

Repository for documentation and issues tracking for BulkEdit EPiserver addon.

Introduction

Bulk Edit is a plugin that allows to make changes to more than one Content at the same time. This can save time by simultaneously updating multiple properties that share the same information. This can be useful when a new property has been added to a ContentType and a default value needs to be assigned, or for making periodic (e.g. monthly) updates to the property.

Supported versions

The supported version is EPiServer.CMS 12.17.1+. EPiserver 11 is not supported.

Install

Install-Package Advanced.CMS.BulkEdit

In order to start using BulkEdit module you need to add the following statement to Startup.cs

public class Startup
{
    ...
    public void ConfigureServices(IServiceCollection services)
    {
        ...
        services.AddBulkEdit();
        ...
    }
    ...
}

Using BulkEdit addon

Bulk Edit is a command available in the page tree. It can be selected from any tree item that has children.

Bulk Edit command

After selecting the command, a dialog box is displayed with a selection of pages. You can edit all children, or all descendants.

The list can also be filtered by type.

By selecting the "selected" option, you can manually select the pages to be edited.

Bulk Edit selector

Once Editor have decided which pages he wants to edit, he need to select the fields. This is done in an editing form similar to that used in ContentArea. The difference is that a checkbox is available next to each field label, which is used to select the fields to be edited. After selecting the checkbox, Editor needs to enter the value, which will be set, for all selected pages. More than one field can be selected.

By default, the value of the first selected page is used.

Bulk Edit form

After clicking Next, Editor see progress dialog and content items are updated

Bulk Edit progress

Handling errors

When saving an item and error occured, the bulk edit continue updating other items. Error message is displayed next to content name.

Bulk Edit save errors

Publishing edited content

When using the Bulk Edit module, new draft pages are created, but they are not published. To improve publishng process, the Editor can add edited items to the project and use the Bulk Edit command available in the project overview.

Bulk Edit project command

Hiding properties on bulk edit form

By default, the Bulk Edit module allows you to eydt all fields defined on ContentType. You can change this behavior through code and hide selected properties on the editing form. To do this we need to use the AllowBulkEdit attribute, which is configured on the field.

In the following example, the TestProperty field will not be editable with BulkEdit.

[ContentType(GUID = "638D8271-5CA3-4C72-BABC-3E8779233263")]
public class NewsPage : PageData
{
    // ...

    [AllowBulkEdit(false)]
    public virtual string TestProperty { get; set; }

    // ...
}

How form is created

Form is created as a subset of selected ContentTypes. The properties have to match by name, type, but also by settings.

Bulk Edit metadata

In the example only Prop1 will be displayed in the editing form, because other properties does not match by type of settings.

Limitations

There is no transaction

Editing content items using bulk edit will not start the transaction. Each content is saved separately. The update will not sop when one of the content was not saved successfully.

Options

Some parts of the module are configurable using option classes.

BulkEditOptions

Option Type Default Description
DefaultAllowBulkEditOnProperty boolean true When true, then command is added to page tree

Example:

public class Startup
{
    ...
    public void ConfigureServices(IServiceCollection services)
    {
        ...
            services.Configure<BulkEditUiOptions>(o =>
            {
                o.PageTreeCommandEnabled = false;
                o.ProjectCommandEnabled = false;
                o.MaximumSafeContentItemsToUpdate = 1000;
            });
    ...
}

BulkEditUiOptions

Option Type Default Description
PageTreeCommandEnabled boolean true When true then bulk edit is enabled for property without using AllowBulkEdit attribute
ProjectCommandEnabled boolean true When true, then command is added to projects overview
AssetsPaneCommandEnabled boolean false When true, then Assets pane command is enabled
MaximumSafeContentItemsToUpdate boolean true Above this number the notification background color will change to warning
public class Startup
{
    ...
    public void ConfigureServices(IServiceCollection services)
    {
        ...
            services.Configure<BulkEditOptions>(o =>
            {
                o.DefaultAllowBulkEditOnProperty = false;
            });
    ...
}

Reporting bugs and requesting new features

To report bugs or request for new features please use Issues tab.

About

Documentation and issues tracking for BulkEdit addon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published