Microsoft Content Management Server - WebAuthorContextMode...

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > February 2004 > WebAuthorContextMode...





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 WebAuthorContextMode...
STELIOS ISSAIAS

2004-02-04, 10:48 am

Hi Stefan et al,
I have a piece of code that tracks user movement throught my site. I want
this code to trigger only when the site is on Live Mode and not Edit Mode. I
found the following piece of code on the MSCMS 2002 FAQ which I translated
into VB.NET:

Dim Mode As Microsoft.ContentManagement.WebControls.WebAuthorContextMode
If (Mode = WebAuthorContextMode.AuthoringNew Or Mode =
WebAuthorContextMode.AuthoringPreview Or Mode =
WebAuthorContextMode.AuthoringReedit) Then
Response.Write("Authoring Mode")
ElseIf (Mode = WebAuthorContextMode.PresentationPublished Or Mode =
WebAuthorContextMode.PresentationUnpublished) Then
Response.Write("Publishing Mode")
End If

My problem is that I want to check between the LIVE mode and EDIT mode
How do I do this and is anything missing from my code?

Regards


_______________________________________
Stelios Issaias
Technical Lead Developer
Amaze London
5 Warren Mews
Warren Street
London W1T 6AP
Tel. 0207 554 3512
s.issaias@amaze.com
www.amaze.com
This communication contains information
which is confidential and may also be
privileged. It is for the exclusive use of
the addressee(s). If you are not a named
addressee please note that any distribution,
reproduction, copying, publication or use of
this communication or the information in it
is prohibited. If you have received this
communication in error, please contact the
sender immediately, and also delete the
communication from your computer.


Stefan [MSFT]

2004-02-04, 10:49 am

Hi Stelios,

CMS knows Published mode, Unpublished mode and Authoring mode.
Is Edit mode Unpublished mode or Authoring mode in your context?

I assume you mean Unpublished mode.
Then you need to determine

If (Mode = WebAuthorContextMode.PresentationPublished) Then
Response.Write("LIVE Mode")
ElseIf (Mode = WebAuthorContextMode.PresentationUnpublished) Then
Response.Write("EDIT Mode")

Cheers,
Stefan.

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


"STELIOS ISSAIAS" <stelios@amaze.com> wrote in message
news:eVltSda6DHA.2712@tk2msftngp13.phx.gbl...
quote:

> Hi Stefan et al,
> I have a piece of code that tracks user movement throught my site. I want
> this code to trigger only when the site is on Live Mode and not Edit Mode.


I
quote:

> found the following piece of code on the MSCMS 2002 FAQ which I translated
> into VB.NET:
>
> Dim Mode As Microsoft.ContentManagement.WebControls.WebAuthorContextMode
> If (Mode = WebAuthorContextMode.AuthoringNew Or Mode =
> WebAuthorContextMode.AuthoringPreview Or Mode =
> WebAuthorContextMode.AuthoringReedit) Then
> Response.Write("Authoring Mode")
> ElseIf (Mode = WebAuthorContextMode.PresentationPublished Or Mode =
> WebAuthorContextMode.PresentationUnpublished) Then
> Response.Write("Publishing Mode")
> End If
>
> My problem is that I want to check between the LIVE mode and EDIT mode
> How do I do this and is anything missing from my code?
>
> Regards
>
>
> _______________________________________
> Stelios Issaias
> Technical Lead Developer
> Amaze London
> 5 Warren Mews
> Warren Street
> London W1T 6AP
> Tel. 0207 554 3512
> s.issaias@amaze.com
> www.amaze.com
> This communication contains information
> which is confidential and may also be
> privileged. It is for the exclusive use of
> the addressee(s). If you are not a named
> addressee please note that any distribution,
> reproduction, copying, publication or use of
> this communication or the information in it
> is prohibited. If you have received this
> communication in error, please contact the
> sender immediately, and also delete the
> communication from your computer.
>
>




STELIOS ISSAIAS

2004-02-04, 10:49 am

Basically its published and Authoring together, that I need.
When you have published a page already and you want to
me a change then it switches to Edit Mode. Thats what I need to
test for.

Thanks



"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:OedCdEj6DHA.1504@TK2MSFTNGP12.phx.gbl...
quote:

> Hi Stelios,
>
> CMS knows Published mode, Unpublished mode and Authoring mode.
> Is Edit mode Unpublished mode or Authoring mode in your context?
>
> I assume you mean Unpublished mode.
> Then you need to determine
>
> If (Mode = WebAuthorContextMode.PresentationPublished) Then
> Response.Write("LIVE Mode")
> ElseIf (Mode = WebAuthorContextMode.PresentationUnpublished) Then
> Response.Write("EDIT Mode")
>
> Cheers,
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no


rights.
quote:

>
>
> "STELIOS ISSAIAS" <stelios@amaze.com> wrote in message
> news:eVltSda6DHA.2712@tk2msftngp13.phx.gbl...
want[QUOTE][color=darkred]
Mode.[QUOTE][color=darkred]
> I
translated[QUOTE][color=darkred]
>
>




Stefan [MSFT]

2004-02-04, 10:49 am

Hi Stelios,

sorry, still not sure what you mean.
Please describe exactly the actions you do to go to the desired mode.

Cheers,
Stefan.

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


"STELIOS ISSAIAS" <stelios@amaze.com> wrote in message
news:einpWoj6DHA.2488@TK2MSFTNGP09.phx.gbl...
quote:

> Basically its published and Authoring together, that I need.
> When you have published a page already and you want to
> me a change then it switches to Edit Mode. Thats what I need to
> test for.
>
> Thanks
>
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:OedCdEj6DHA.1504@TK2MSFTNGP12.phx.gbl...
> rights.
> want
> Mode.
> translated
Microsoft.ContentManagement.WebControls. WebAuthorContextMode[QUOTE][color=darkre
d]
>
>




STELIOS ISSAIAS

2004-02-04, 10:49 am

Ok, I ve created a new page,(containing one placeholder), published it,
approved it it shows fine. Then I right click on the page, and click on
Switch to Edit Site. Then the site goes to Edit Mode. Thats what I am
looking after. Does this make sense ?




"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:%23cXskTk6DHA.3648@TK2MSFTNGP11.phx.gbl...
quote:

> Hi Stelios,
>
> sorry, still not sure what you mean.
> Please describe exactly the actions you do to go to the desired mode.
>
> Cheers,
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no


rights.
quote:

>
>
> "STELIOS ISSAIAS" <stelios@amaze.com> wrote in message
> news:einpWoj6DHA.2488@TK2MSFTNGP09.phx.gbl...
> Microsoft.ContentManagement.WebControls.WebAuthorContextMode
mode[QUOTE][color=darkred]
>
>




Stefan [MSFT]

2004-02-04, 10:49 am

Hi Stelios,

ok this is Unpublished mode and not Authoring mode.
This code does what you are looking for:

If (Mode = WebAuthorContextMode.PresentationPublished) Then
Response.Write("LIVE Mode")
ElseIf (Mode = WebAuthorContextMode.PresentationUnpublished) Then
Response.Write("EDIT Mode")

Cheers,
Stefan.

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


"STELIOS ISSAIAS" <stelios@amaze.com> wrote in message
news:e3knlUl6DHA.1556@tk2msftngp13.phx.gbl...
quote:

> Ok, I ve created a new page,(containing one placeholder), published it,
> approved it it shows fine. Then I right click on the page, and click on
> Switch to Edit Site. Then the site goes to Edit Mode. Thats what I am
> looking after. Does this make sense ?
>
>
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:%23cXskTk6DHA.3648@TK2MSFTNGP11.phx.gbl...
> rights.
I[QUOTE][color=darkred]
Edit[QUOTE][color=darkred]
=[QUOTE][color=darkred]
> mode
>
>




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com