6

Here is my code. I am using filter to restrict the item types and successful in the attempt.but not for local copies and localized items.

var filter = {
        conditions:
        {
            InclLocalCopies: false,                          
            IsLocalized: false,
            ItemTypes: [$const.ItemType.COMPONENT],
            ShowNewItems: false
        }
    };

    var rootId = (window.dialogArguments && window.dialogArguments.publicationId) ? window.dialogArguments.publicationId : "";
    var self = this;
    p.ItemPopup = $popup.create(
        $cme.Popups.ITEM_SELECT.URL.format(rootId),
        $cme.Popups.ITEM_SELECT.FEATURES, { filter: filter});
1

1 Answer 1

3

Unfortunately, that particular popup only supports filtering on certain things. It doesn't blindly use the filter you give it, but copies specific properties you've set over some default filtering options.

Popups like that one are not generic, re-usable controls, but rather specific to the CME. So sometimes you run into limitations due to it not being designed to handle a particular scenario.

If you want to filter out localized items, you might need to create your own dialog (view). You could inherit everything from the existing view and override the getDataFilter method. In your method you'd call the base method and then set the additional filtering properties you want.

If you could somehow identify that the request is specifically for your scenario, it would be a lot easier to implement a data extender for this. It's possible you'll likely end up accidentally hiding localized items everywhere, though...

2
  • Thanks for your response. I got the below OOB filter options(When I debugged).
    – User344
    Dec 30, 2013 at 12:48
  • Thanks for your response. I got the below OOB filter options(When I debugged, pasting few because of space contsraints). Please let me know in case if we have any options other than Customization. Thanks in advance// OnlyLatestVersions, // boolean // InPublication, // uri string // InclLocalCopies, // boolean // InclParentItem, // boolean // InclExternalLinks, // boolean // Enumeration, // string // InfoType, // number, Model.getListPublishTransactionStates() // StartDate, // Date // EndDate, // Date // User, // user uri string // Publication, // publication uri string
    – User344
    Dec 30, 2013 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.