surya
surya

Reputation: 3

Optimizely CMS 12 : Delete unused Media ,Blocks individually in PowerSlice

I'm trying to implement **PowerSlice ** gadget in our solution. Installed PowerSlice **5.2.0 ** package.

Able to fetch unused blocks and media.

 public override QueryRange<IContent> ExecuteQuery(IQueryParameters parameters)
    {
        var originalContentRange = base.ExecuteQuery(parameters);
        var filteredResults = originalContentRange.Items.Where(IsNotReferenced).ToList();

        var itemRange = new ItemRange
        {
            Total = filteredResults.Count,
            Start = parameters.Range.Start,
            End = parameters.Range.End
        };

        return new ContentRange(filteredResults, itemRange);
    }

    protected bool IsNotReferenced(IContent content)
    {
        return !ContentRepository.GetReferencesToContent(content.ContentLink, false).Any();
    }

But I'm not seeing an option for selecting individual items and delete.

powerslice

Does this version of gadget has feasibility to have check box for selecting required items and delete them or do we need to implement additional logic.

Upvotes: 0

Views: 123

Answers (0)

Related Questions