lastest posting within a channel
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
lastest posting within a channel

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
Mindy
Guest





Posted: Thu Oct 20, 2005 4:51 pm    Post subject: lastest posting within a channel Reply with quote

Is there any way to get the lastest posting within a Channel instead of the
entire site?

There is an exampel in Building website with MCMS to show get the latest
posting of the entire site, by using the following syntax:

cmsContext.Searches.NewPosting(Number);

Thanks
Back to top
Stefan [MSFT]
Guest





Posted: Thu Oct 20, 2005 4:51 pm    Post subject: Re: lastest posting within a channel Reply with quote

Hi Mindy,

you can do this by using these steps:

Channel ch = ...
PostingCollection pc = ch.Postings;
pc.SortByLastModifiedDate(false);
Posting p = pc[0];

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Mindy" <Mindy@discussions.microsoft.com> wrote in message
news:08D36012-FF2E-40A3-8D85-628F08C26A89@microsoft.com...
Quote:
Is there any way to get the lastest posting within a Channel instead of
the
entire site?

There is an exampel in Building website with MCMS to show get the latest
posting of the entire site, by using the following syntax:

cmsContext.Searches.NewPosting(Number);

Thanks
Back to top
Mindy
Guest





Posted: Thu Oct 20, 2005 4:51 pm    Post subject: Re: lastest posting within a channel Reply with quote

Thanks for the quick response.

Do i need a recurive funtion to get the latest posting of its sub channels?
E.g
Channel A
- Posting 1, Posting 2
Channel A.1
Channel A.1.1




"Stefan [MSFT]" wrote:

Quote:
Hi Mindy,

you can do this by using these steps:

Channel ch = ...
PostingCollection pc = ch.Postings;
pc.SortByLastModifiedDate(false);
Posting p = pc[0];

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Mindy" <Mindy@discussions.microsoft.com> wrote in message
news:08D36012-FF2E-40A3-8D85-628F08C26A89@microsoft.com...
Is there any way to get the lastest posting within a Channel instead of
the
entire site?

There is an exampel in Building website with MCMS to show get the latest
posting of the entire site, by using the following syntax:

cmsContext.Searches.NewPosting(Number);

Thanks


Back to top
Stefan [MSFT]
Guest





Posted: Mon Oct 24, 2005 8:51 am    Post subject: Re: lastest posting within a channel Reply with quote

Hi Mindy,

the answer is yes.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Mindy" <Mindy@discussions.microsoft.com> wrote in message
news:6936DD46-60EE-497F-A825-3751824BA822@microsoft.com...
Quote:

Thanks for the quick response.

Do i need a recurive funtion to get the latest posting of its sub
channels?
E.g
Channel A
- Posting 1, Posting 2
Channel A.1
Channel A.1.1




"Stefan [MSFT]" wrote:

Hi Mindy,

you can do this by using these steps:

Channel ch = ...
PostingCollection pc = ch.Postings;
pc.SortByLastModifiedDate(false);
Posting p = pc[0];

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no
rights

New to MCMS?
Check out this book: Building Websites Using MCMS:
http://tinyurl.com/6zj44
----------------------


"Mindy" <Mindy@discussions.microsoft.com> wrote in message
news:08D36012-FF2E-40A3-8D85-628F08C26A89@microsoft.com...
Is there any way to get the lastest posting within a Channel instead of
the
entire site?

There is an exampel in Building website with MCMS to show get the
latest
posting of the entire site, by using the following syntax:

cmsContext.Searches.NewPosting(Number);

Thanks


Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB