Developer forum

Forum » Integration » Check 'Show in searches' on import.

Check 'Show in searches' on import.

Jesse Bakker
Reply

Hi,

We have solution where page itemtypes are being imported with the Data Integration module. (Source: Custom provider,  Destination: Item provider)

The import works fine, but on the created pages the checkbox 'Show in searches' is unchecked in the page properties. But we want it checked by default. 

Is it possible set the default on checked with the Data Integration module?

The itemtype is code-first btw.

BR, Jesse


Replies

 
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Jesse,
when using the destination Item provider to insert items as sub pages or new pages, there is a "DestinationPageID" column in the mappping.
The value of "DestinationPageID"  can be a page id or a page menu text(which will be used to find the appropriate page).
Then if page (to associate newly imported items with) is found by the "DestinationPageID" value - it is using the "PageAllowsearch" value
from the found Destinatination page, so if you could use the DestinationPageID with PageAllowsearch set to true for this particular page,
it should solve your problem.

Or you could also choose the "New items root page" with PageAllowsearch in the "edit destination settings" dialog in the Data integration job,
then all new items will reside under this page.

If none of the ways is suitable you could subscribe to the "Notifications.Integration.JobFinished" notification and handle the setting
"PageAllowsearch" manually by using the Dynamicweb api. For example: get the pages associated with the imported items or
get all pages where PageAllowsearch is set to false and set it to true.

Regards, Dmitrij

Votes for this answer: 1
 
Jesse Bakker
Reply

Hi Dmitriy,

Thanks for your answer, we can work with this!

BR, Jesse

 

 

You must be logged in to post in the forum