Custom Pipe and Page Selector
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
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)
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