Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris 10 posts 40 karma points
    Jun 02, 2017 @ 17:52
    Chris
    0

    Bulk edit property?

    Any chance BulkManager will - in a future release - allow a user to bulk edit properties? Just like changing the Template, this would be hugely helpful!

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jun 03, 2017 @ 06:20
    Richard Soeteman
    100

    Hi Chris,

    Yes that is on the list of things to implement, propably v2.

    Thanks for suggesting,

    Richard

  • Priyanka Kanojia 17 posts 88 karma points
    Feb 14, 2019 @ 12:54
    Priyanka Kanojia
    0

    Hey Richard.

    Which v2 are you talking about and can you elaborate the usage of Bulk Manager?? Is it Possible to save bulk propertyTypes which consumes minimum time for saving?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 14, 2019 @ 13:01
    Richard Soeteman
    0

    Sorry this was a bit too big for V2 and not implemented, still on the list.

    Best,

    Richard

  • Priyanka Kanojia 17 posts 88 karma points
    Feb 14, 2019 @ 13:05
    Priyanka Kanojia
    0

    Hey Richard,

    Can you suggest some other solution for saving bulk propertyTypes in documentTypes programmatically that takes minimum amount of time.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 14, 2019 @ 13:11
    Richard Soeteman
    0

    Currently there is no solution for that other than build yourself that's why it's still on the list of things to built.

  • Thomas Egebrand Gram 63 posts 138 karma points
    Jul 08, 2019 @ 14:03
    Thomas Egebrand Gram
    0

    For anyone else stumbling upon this thread, here's my crude way of bulk editing content.

    Simply paste this into a template, locally, run it once and remove. (or some other way you choose, the result is the same)

    @using Umbraco.Core;
    @using Umbraco.Core.Models;
    @using Umbraco.Core.Services;
    @using System.Linq;
    
    // Select the pages you want to edit (this is a custom doctype)
    var posts = Model.Descendants<Blogpost>("blogpost").ToList();
    
    // Get the content service for manipulating the content
    IContentService cs = Services.ContentService;
    
    // Get the content as IContent
    IEnumerable<IContent> cList = cs.GetByIds(posts.Select(x => x.Id));
    
    // Loop over and save
    foreach (IContent cNode in cList)
    {
        // Set the new values here
        cNode.SetValue("umbracoNaviHide", false);
    
        // Save || SaveAndPublish the node
        cs.SaveAndPublish(cNode);
    }
    

    Query the pages you want to edit however you want, add the properties you'd like to edit, and voila.

    REMEMBER: If you have a lot of nodes, this can take quite a while, as it queries the database for each node (to save and publish). You may wanna filter the results, and take a backup of your database before you begin.

  • Marcio Goularte 372 posts 1344 karma points
    Jul 08, 2019 @ 14:07
    Marcio Goularte
    0

    suggestion, make raiseEvents false

    cs.SaveAndPublish(cNode, raiseEvents: false);
    
Please Sign in or register to post replies

Write your reply to:

Draft