However, if authors use Copy, Move, or Create a Connected Page, the event
handler does not run, as the properties are not changed. Therefore an author
could still place a page with a duplicate Name or Display Name value. I
would like to modify the above-mentioned Console controls to check the page
name values, and possibly take one of the following actions if a name is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1", "Copy2", ...)
I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue boxes
Anyone else done this?
the normal behaviour scripts are generated by the original controls.
By deriving your controls from these controls you can access them using
base.ActionJavaScript.
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
----------------------
"MurrayTh" <Murr...@discussions.microsoft.com> wrote in message
news:D7A2D056-9B52-4AF7...@microsoft.com...
I guess the easiest way to view the javascript for a console control is then
to just view the source of the generated page and find the appropriate
source? Is there a a general reference to refer to for the console controls?
Looking up the Copy and Move actions, the actions both just open a MCMS
dialogue window, and the dialogues seem to take it from there. Does this
mean I should create my own modified versions of the PageCopy and PageMove
dialogue boxes that will process the decisions the way I would like?
Murray
I would always derive from the orignal controls and just modify the
javascript (e.g. add some code at the beginning or the end.
This will ensure that your code will also work after hotfixes have been
installed which often modify the generated javascript code.
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
----------------------
"MurrayTh" <Murr...@discussions.microsoft.com> wrote in message
news:CD8C2695-603B-4826...@microsoft.com...
Thanks for the clarification. In the case of Copy and Move actions, the
javascript opens MCMS dialogue boxes, and the dialogue boxes seem to take it
from there. I guess this means my custom action can derive from the original
control, but I will also have to create a new dialogue box that the action
opens, correct? Can I derive the new dialogue box from the from the
Microsoft.ContentManagement.WebAuthor.CMS.WebAuthor.Dialogs namespace and the
appropriate MCMS aspx pages?
To summarize, I want a control to:
-perform the same function as the Copy action, but also
-append the name fields if an existing page name is found
Can I :
1. Develop a custom "Copy and Append" Console control:
-derived from the original Copy action
-opens a custom "PageCopyAndAppend" dialogue box
2. Develop a "PageCopyAndAppend" dialogue box
-derived from
Microsoft.ContentManagement.WebAuthor.CMS.WebAuthor.Dialogs.PageCopy
and PageCopyDlg aspx pages
-alter the Selection Frame to process the new posting, altering the page
name if required
for the dialog boxes I would suggest to create your own dialogs.
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
----------------------
"MurrayTh" <Murr...@discussions.microsoft.com> wrote in message
news:6B7E7F42-27E9-41C9...@microsoft.com...