Microsoft Content Management Server - Archiving

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > December 2004 > Archiving





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Archiving
margey

2004-12-22, 7:46 am

Hi all,

This is what i am trying to achieve, I have a page which display links to
latest news items, i also want it to display links to archived news items. So
basically at the moment i have a channel news, then a posting called default.
When a new posting(news item) is added to channel news, the default posting
will display all the postings in the news channel apart from default. Now my
idea was that on the last day of a month, a new sub channel of news channel
would dynamically be created with the name of the channel set as month year
i.e December-2004, I would then like to move the postings that were created
in that month moved from the news channel to the new December-2004 channel.
And then on the default posting of the news channel these archive links would
be displayed. I know how to create channels the date part shouldnt be to
diifcult, but where or at what stage do i create the new channel, I dont
where to put it in the code is it on the pageload of the template, or would
that try and create new channel on the last day of the month every time the
page is loaded that day? Any ideas or a better way of doing this?

James
Angus Logan [MVP]

2004-12-22, 5:52 pm

Hi James,

You really want to keep this async so if you are archiving lots it won't
slow down your web requests.

So what I would do is write it as a scheduled tool:-
possibly write it as a webservice to check if there are any items that
require archiving etc & create the channel.

Then you could have scheduled job to hit the webservice.

you could also write a windows service i suppose.

Regards
--
________________________________________


Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________

"margey" <margey@discussions.microsoft.com> wrote in message
news:8BBDB5DB-056D-4F23-B235-B16A6CF30DA4@microsoft.com...
> Hi all,
>
> This is what i am trying to achieve, I have a page which display links to
> latest news items, i also want it to display links to archived news items.
> So
> basically at the moment i have a channel news, then a posting called
> default.
> When a new posting(news item) is added to channel news, the default
> posting
> will display all the postings in the news channel apart from default. Now
> my
> idea was that on the last day of a month, a new sub channel of news
> channel
> would dynamically be created with the name of the channel set as month
> year
> i.e December-2004, I would then like to move the postings that were
> created
> in that month moved from the news channel to the new December-2004
> channel.
> And then on the default posting of the news channel these archive links
> would
> be displayed. I know how to create channels the date part shouldnt be to
> diifcult, but where or at what stage do i create the new channel, I dont
> where to put it in the code is it on the pageload of the template, or
> would
> that try and create new channel on the last day of the month every time
> the
> page is loaded that day? Any ideas or a better way of doing this?
>
> James



Mei Ying [MVP]

2004-12-22, 8:54 pm

Hi

In addition to Angus' suggestion, to access MCMS objects,
you can use the CmsApplicationContext class within console
applications, webservices, et al. Here's an example for a
console app (which can be scheduled to run on a regular
basis):

static void Main(string[] args)
{
CmsApplicationContext cmsContext = new
CmsApplicationContext();
cmsContext.AuthenticateAsCurrentUser();
Channel c = cmsContext.Searches.GetByPath
("/Channels/MyChannel/") as Channel;

... code continues...

cmsContext.Dispose();
}

You can use the same technique for writing other kinds of
batch jobs that work with MCMS.

HTH
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---

>-----Original Message-----
>Hi James,
>
>You really want to keep this async so if you are

archiving lots it won't
>slow down your web requests.
>
>So what I would do is write it as a scheduled tool:-
>possibly write it as a webservice to check if there are

any items that
>require archiving etc & create the channel.
>
>Then you could have scheduled job to hit the webservice.
>
>you could also write a windows service i suppose.
>
>Regards
>--
> ________________________________________

>
>Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
>Product Specialist
>Microsoft Application Solutions
>Data#3 Limited
>E angus_logan@data3.com.au
>BLOG www.anguslogan.com
> ________________________________________

>"margey" <margey@discussions.microsoft.com> wrote in

message
>news:8BBDB5DB-056D-4F23-B235-B16A6CF30DA4@microsoft.com...
which display links to[vbcol=seagreen]
archived news items.[vbcol=seagreen]
posting called[vbcol=seagreen]
the default[vbcol=seagreen]
from default. Now[vbcol=seagreen]
channel of news[vbcol=seagreen]
channel set as month[vbcol=seagreen]
postings that were[vbcol=seagreen]
December-2004[vbcol=seagreen]
these archive links[vbcol=seagreen]
part shouldnt be to[vbcol=seagreen]
new channel, I dont[vbcol=seagreen]
the template, or[vbcol=seagreen]
month every time[vbcol=seagreen]
doing this?[vbcol=seagreen]
>
>
>.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com