1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Pipe and Page Selector

Custom Pipe and Page Selector

3 posts, 0 answered
  1. Anton Mernov
    Anton Mernov avatar
    110 posts
    Registered:
    03 Dec 2008
    08 Nov 2011
    Link to this post
    Hi Sitefinity support,

    I'm trying to create a custom inbound pipe that will index content from my custom module. In general, all is going fine. One issue I've faced is how can I display the page selector for my custom pipe? See defaultpage.jpg

    Using Firebug I've discovered that actually all HTML for the page selector has been generated but it is hidden (See hiddenoptions.jpg). I can make it visible with Firebug and I even can chose the needed page! I supposed that it was hidden by some javascript code. It was not easy to find this code but here is it:

    var loc = args.FindControl("contentLocation");
            var uidesc = args.FindControl("contentUIDescription");
     
            if (!this._showContentLocation) {
     
                jQuery(loc).hide();
            }
            else {
                if (!this._pipeNeedsPageId(args.get_dataItem().PipeName)) {
                    jQuery(loc).hide();
                    jQuery(uidesc).hide();
                }
                var changeSettingsButton = args.FindControl("changeSettingsButton");
                jQuery(changeSettingsButton).hide();
     
            }
    ....
        _pipeNeedsPageId: function (pipeName) {
            return pipeName == "ContentInboundPipe" || pipeName == "ProductInboundPipe";
        }

    In short, it checks the pipe name and if it is not ContentInboundPipe or ProductInboundPipe the page selector will be hidden. Obviously, that my custom pipe has another name.

    Is there any workaround how to display the page selector for my custom pipe?

    Thanks in advance,
    Anton
  2. jocelyn payneau
    jocelyn payneau avatar
    51 posts
    Registered:
    07 Dec 2009
    09 Nov 2011
    Link to this post
    Hello, 

    I have got the same issue. Here is what you need to do : 

    You should do some additional steps to get this working. I attached the code that you need but here is a few words what it does. First the ListPipeSettingsField class is extended by ExtListPipeSettingsField in order to extend the JavaScript component code. The code in ExtListPipeSettingsField.js overrides the _pipeNeedsPageId method in order to indicate that your pipe needs a default page. After you add the code you need to register it in the configuration of Sitefinity. Go to Administration -> Settings -> Advanced. In the tree in the left expand Search -> Controls -> SearchBackend -> Views -> SearchBackendInsert -> Sections -> PipeSettingsSectionInbound -> Fields -> InboundSettings (look at the screen-shot). In the screen in the right, enter the full name of ExtListPipeSettingsField (in this case SitefinityWebApp.Code.ExtListPipeSettingsField, SitefinityWebApp) in the FieldType textbox and press "Save changes". Do the same steps for SearchBackendEdit (the node on the same level and below SearchBackendInsert)

    In other word in the js file you need to add some thing like this :  || pipeName == "YourCustomInboundPipe"

    Could you please give me an e-mail as I can send you the files you will need. 

    Mekongboy
  3. Anton Mernov
    Anton Mernov avatar
    110 posts
    Registered:
    03 Dec 2008
    09 Nov 2011
    Link to this post
    Hi jocelyn payneau,

    Thank you for reply! I figured out that you mean. Great solution :)

    But I'm afraid it won't work in my case. The problem in that the actions you have described must be done automatically (programmatically) in my case. Otherwise, I should to force each user that will use my module to make the same actions. And, to be honest, this is not easy...

    Sitefinity team, any other suggestions?

    Thanks
3 posts, 0 answered