Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Exclude this document from search View modes: 
User avatar
Member
Member
Rene 7 - 4/15/2012 10:52:32 PM
   
Exclude this document from search
Dear Kentico,
we have a group of new articles/pages coming up every month, like a magazin. They are built in about 2 week, and in the new articles should be published (for external proof reading), but excluded from the search. (CMSDesk > Content > Properties > Search > Exclude this document from search)
Is there a way to do this programmatically in a custom web part like [pseudo code]

if ( ParentNode is not published ){
exclude this document from search
}

Thank you for your help.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 4/16/2012 7:20:47 AM
   
RE:Exclude this document from search
Hi,

you could exclude the document from search programmatically using:

node.SetValue("DocumentSearchExcluded",true);

So you can create the article directly with above option using API:
Create document using API

Best regards,
Ivana Tomanickova