Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > Urgent: How to get New Added Page Detail in New Database View modes: 
User avatar
Member
Member
Anuj - 10/14/2009 5:25:10 AM
   
Urgent: How to get New Added Page Detail in New Database
I want to know that when I am adding or removing any page from Kentico CMS interface then I get page information (Page Name and its virtual Address) in my other database which doesn't belong from Kentico.

If anyone has the relevant solution on this so Plz help me.

Thanks,
Anuj

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/14/2009 11:43:15 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hello Anuj,

you could use the custom Tree node handler which handles by the way OnAfterInsert and OnBeforeDelete events. Please see here: http://devnet.kentico.com/docs/devguide/treenode_handler.htm for more details.

You may add your custom code to these methods.

Best regards,
Helena Grulichova

User avatar
Member
Member
Anuj - 10/15/2009 12:53:54 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Helena,

Thanks for the support. But I am currently using Free Edition of Kentico and there all the codes are available in DLL files so I can't make any changes in this class. Is there any way to make changes in Free edition of Kentico for testing purpose regarding this issue?

I also wish to know that how could I differentiate that user is adding a Document page or a Image Gallery or a CSS Document.

I wish to get a detail only when user is adding/Removing a Page.

Thanks,
Anuj

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/15/2009 3:23:58 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Anuj,

you may use custom providers even with Free edition. Please see here: http://devnet.kentico.com/docs/devguide/event_handling_overview.htm for more details about configuration of custom handlers.

It handles nodes in the content tree (not e.g. CSS stylesheet). You may add the condition about the document type like on the sample in: http://devnet.kentico.com/docs/devguide/index.html?disk_permissions_problems.htm

// type the document as TreeNode
TreeNode newsDoc = (TreeNode)treeNodeObj;

// handle the event only for news items
if (newsDoc.NodeClassName.ToLower() == "cms.news")


Best regards,
Helena Grulichova

User avatar
Member
Member
Anuj - 10/15/2009 7:07:57 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Helena,

Thanks for this support. The link which you have told me to view : http://devnet.kentico.com/docs/devguide/index.html?event_handling_overview.htm has a Default event handler library section. In this it is adding <add key="CMSCustomHandlersAssembly" value="CMS.CustomEventHandlerVB" /> library but In this it is adding CMS.CustomEventHandler project for editing. So it is giving error.

I have changed it to CMS.CustomEventHandler and then added the given code in OnAfterUpdate method but it is showing error when I am trying to login in CMS Desk.

Error is : Unable to cast object of type 'CMS.DataEngine.SimpleDataClass' to type 'CMS.DataEngine.DataClass'.

on line : DataClass dataItem = (DataClass)dataObj;

I am using Kentico CMS 4.1 version. I am using .NET 3.5 and VS 2008 for any changes.

Please tell me that on which point I am commiting mistake or there is something more to change.


Thanks,
Anuj

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/16/2009 7:05:47 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Anuj,

Do you use Visual Basic?

If so, please add the CustomEventHandlerVB.vbproj file to your project.

Best regards,
Helena Grulichova

User avatar
Member
Member
Anuj - 10/20/2009 12:07:23 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Helena,

I am using .NET interface for any changes. It is Visual Studio 2008 with .NET Framework 3.5.

Would you please provide me help so that I could work on this platform?

Thanks in Advance...

Anuj

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/20/2009 5:28:22 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Anuj,

I meant if you use Visual basic or C#. Because if you use C# you should ignore that box (Default event handler library section). It applies only for those who use VB.

Best regards,
Helena Grulichova

User avatar
Member
Member
Anuj - 10/20/2009 6:12:15 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Helena,

I meant that I have already done this. I have added CustomEventHandler.csproj in the project. Kentico CMS is on C# so there is C# used by me. I added the given code in OnAfterUpdate method but it is showing error when I am trying to login in CMS Desk.

Error is : Unable to cast object of type 'CMS.DataEngine.SimpleDataClass' to type 'CMS.DataEngine.DataClass'.

on line : DataClass dataItem = (DataClass)dataObj;

I am using Kentico CMS 4.1 version.

Please tell me that on which point I am commiting mistake or there is something more to change.


Thanks,
Anuj

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/20/2009 7:47:10 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Anuj,

it seems you use custom Data handler. Is it right?

If you want to handle documents please use custom TreeNode handler. Or are you trying to handle different objects?

Best regards,
Helena Grulichova

User avatar
Member
Member
Anuj - 10/21/2009 4:49:32 AM
   
RE:Urgent: How to get New Added Page Detail in New Database
Hi Helena,

I just want to get list of all available pages only in my CMS created website (excluding CSS Pages and Images) with there original path which are not hidden in CMS Website.

I am really new in Kentico CMS, I have just started to adopt this new CMS for my websites so I don't have much idea of working in it.

Would you please guide me to do this work in Kentico CMS 4.1 Free Edition??

Thanks,
Anuj