Searches.NewPostings()
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Searches.NewPostings()




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Searches.NewPostings()  
sc


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-19-07 12:19 PM

I have my Searches.NewPostings() working.

However I need to show all new Postings below a certain channel and in
the subchannels.
I am using this in an if statement:

if(.......&& posting.Path.ToLower().StartsWith("/channels/channelname")

it is only searching channelname for new postings and not going into
any subchannel.

How do I get around this? txs






[ Post a follow-up to this message ]



    Re: Searches.NewPostings()  
Stefan Goßner [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-19-07 12:19 PM

Hi Sonya,

not sure what you mean.
Does the collection you are iterating through contains postings of the
subchannel?

Cheers,
Stefan


"sc" <sonyacooley@vodafone.ie> wrote in message
news:1169206918.048274.222910@51g2000cwl.googlegroups.com...
>I have my Searches.NewPostings() working.
>
> However I need to show all new Postings below a certain channel and in
> the subchannels.
> I am using this in an if statement:
>
> if(.......&& posting.Path.ToLower().StartsWith("/channels/channelname")
>
> it is only searching channelname for new postings and not going into
> any subchannel.
>
> How do I get around this? txs
>







[ Post a follow-up to this message ]



    Re: Searches.NewPostings()  
sc


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-19-07 12:19 PM

Hi Stefan

This line searches the entire MCMS repository for new Postings.
PostingCollection groupofPostings = cmsContext.Searches.NewPostings(1);

But I have channel below the root channel as a seperate website:[vbcol=seagreen] 

I need to return the new Postings from ONLY SubChannelA AND ALL
channels below SubChannelA

I have an if statement that says:
if(posting.StartDate >= DateTime.Now.Subtract(subtractDays)&&
NumberOfLinks > intCounter &&
posting.Path.StartsWith("/Channels/SubChannelA"))

but this is only returning new Postings in the root of SubChannelA and
not any of its subchannels.






[ Post a follow-up to this message ]



    Re: Searches.NewPostings()  
Stefan Goßner [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-19-07 06:16 PM

Hi SC,

then something seems to be wrong in your string operation.
Sorry but this is not a MCMS related question.

Cheers,
Stefan

"sc" <sonyacooley@vodafone.ie> wrote in message
news:1169209973.191907.301250@s34g2000cwa.googlegroups.com...
> Hi Stefan
>
> This line searches the entire MCMS repository for new Postings.
> PostingCollection groupofPostings = cmsContext.Searches.NewPostings(1);
>
> But I have channel below the root channel as a seperate website: 
>
> I need to return the new Postings from ONLY SubChannelA AND ALL
> channels below SubChannelA
>
> I have an if statement that says:
> if(posting.StartDate >= DateTime.Now.Subtract(subtractDays)&&
> NumberOfLinks > intCounter &&
> posting.Path.StartsWith("/Channels/SubChannelA"))
>
> but this is only returning new Postings in the root of SubChannelA and
> not any of its subchannels.
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:54 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register