CMS Page Status

CMS Page Status

Post by Kell » Thu, 25 Sep 2003 08:18:08


Does anybody know how to programmatically access the Page
Status property (ie. "Waiting for Editor Approval") so
that you can update it to a custom string and/or query
what the current status is?

Stefan previously you advised in a posting:
If you do not have a moderator, then the
WaitingForModeratorApproval status is not correct.
I have written a tool which should help you to identify
all postings with such an invalid state and allow you to
approve them. It is attached to this thread.

But the tool was not attached, can I access it somewhere?

Cheers Kelly.
 
 
 

CMS Page Status

Post by Martin » Thu, 25 Sep 2003 18:06:07

Hi Kelly,

You can use

CmsHttpContext.Current.Posting.State =
PostingState.WaitingForEditorApproval
or
CmsHttpContext.Current.Posting.State = PostingState.Saved
etc etc

to access the different states

HHTH

Martina
Page

 
 
 

CMS Page Status

Post by Stefan [MS » Sat, 27 Sep 2003 08:38:43

Hi Kelly,

you can only read this property.
It is not possible to write to it.
Why would you want to write to it?

Cheers,
Stefan.
 
 
 

CMS Page Status

Post by Kell » Sat, 27 Sep 2003 08:46:13


Thanks Stefan.
 
 
 

CMS Page Status

Post by Kell » Sat, 27 Sep 2003 08:53:33

Hi Stefan,

The main reason I wanted to change it to a custom string
is because I have two Editor Groups so when the
CmsPosting_Approving event is raised I check if it is
Editor1 and if so I decline the approve, if it is Editor2
I let the page get published.

Basically trying to implement an additional level of
approval. I am now looking at implementing a Custom
Status Control or my own. Just so I can tell Editor1
that the page is now waiting for Editor2 approval before
it will be published.

This is my code:

protected void CmsPosting_Approving(Object sender,
ChangingEventArgs e)
{
Posting targetPosting = e.Target as Posting;

if (targetPosting != null)
{
//returns the logged in user
string accName =
e.Context.User.ClientAccountName.ToString();

//find out what groups this user is a
member of
ArrayList userGroups = new ArrayList();
DirectoryEntry obDirEnt = new
DirectoryEntry(accName);
object objectGroups = obDirEnt.Invoke
("Groups");
if (null != objectGroups)
{
foreach (object objGroup in
(IEnumerable)objectGroups)
{
DirectoryEntry
objGrpEntry = new DirectoryEntry(objGroup);
string groupName =
objGrpEntry.Name;
userGroups.Add
(objGrpEntry.Name);
}
}


if (!userGroups.Contains(publishersGroup))
{
e.Cancel = true;
e.SuppressExceptionOnCancel =
true;
}
}
}

Cheers,
Kelly.
 
 
 

CMS Page Status

Post by lchane » Sun, 28 Sep 2003 00:28:04

elly,
As far as third party workflows go, I had been keeping my eye on
www.teamplate.com for that time when we want to implement a work flow.
The stuff that is in CMS 2000 right now is very lacking. The only
thing we really did was to take the usernames, go out to our exchange
server and find the email address and mail an alert to the authors
when they need to approve a posting. Sometimes, that is a lot of
emails.

I'm hoping these guyz have solved some of that.

I would also caution you that implementing a workflow is ALWAYS much
more difficult than you would think and almost invariably will need to
be modified for flexibility in the future. This is truely one area to
get a third party with expertise involved.

Good Luck,

Len

"Stefan [MSFT]" < XXXX@XXXXX.COM > wrote in message news:< XXXX@XXXXX.COM >...