Get the Kentico Code Snippet Library

   —   
Thanks to everyone who provided feedback. I have updated the Kentico CMS code snippet library to include almost 70 code snippets to use. If you are looking for one or want to include one just let me know.
Here is the list of included code snippets
Declarations Folder
CMSHelper.snippet
Using statement
DataEngine.snippet
Using statement
EmailEngine.snippet
Using statement
Filemanager.snippet
Using statement
GlobalEventHelper.snippet
Using statement
GlobalHelper.snippet
Using statement
SiteProvider.snippet
Using statement
SystemDiagnostics.snippet
Using statement
TreeEngine.snippet
Using statement
WorkflowEngine.snippet
Using statement
Documents Folder
AddAttachment.snippet
Add attachment to document
CopyDocument.snippet
Copy document
CreateDocument.snippet
Create new document
CreateLinkedDocument.snippet
Create linked document
DeleteDocument.snippet
Delete document
DeleteLinkedDocument.snippet
Delete linked document
EditDocument.snippet
Edit a document using the DocumentHelper object and provides check in/out
MoveDocument.snippet
Move document
NoWorkflow –CreateDocument.snippet
Create document (Not recommended)
NoWorkflow– DeleteDocument.snippet
Delete document (Not recommended)
NoWorkflow-UpdateDocument.snippet
Update document (Not recommended)
SelectDocument.snippet
Select a document
GetCurrentDocument.snippet
Get the current document
GetDocumentURL.snippet
Get full document URL
General Folder
CheckPublicUser.snippet
Determine if the user is the public anonymous user
GetCurrentAliaspath.snippet
Get current alias path
GetCurrentPageinfo.snippet
Get current page information
GetCurrentSite.snippet
Get current site information
GetCurrentSitename.snippet
Get current site name
GetCurrentUser.snippet
Get current user
GetViewMode.snippet
Get current view mode
ResolvesCurrentPath.snippet
Resolve current path
SendEmailMessage.snippet
Send email message
UserEmail.snippet
Get user email
UserFirstname.snippet
Retrieve user first name
UserFullName.snippet
Retrieve user full name
UserInfo.snippet
Retrieve user information
Userlastname.snippet
Retrieve user last name
Usermiddlename.snippet
Retrieve user last name
Userpreferredculture.snippet
Retrieve user preferred culture
userpreferredUIculture.snippet
Retrieve user preferred UI culture
Global Events\CustomTreeNodeHandler Folder
Switchstatement.snippet
Switch statement for document selection
GlobalEvents\CustomWorkflowHandler Folder
Switchstatement.snippet
Switch statement for document selection
HTML Folder
CMSRepeater.snippet
Add CMS Repeater control
Webpartcontainer.snippet
Add webpart container control
Security Folder
AddGlobaladminuser.snippet
Add new user as global admin
AddUser.snippet
Add user
AddRole.snippet
Add new role
AddUsertoRole.snippet
Add user to role
AddUserToSite.snippet
Add user to site
DeleteRole.snippet
Delete role
DeleteUser.snippet
Delete user
GetAssignedRolesforUser.snippet
Retrieve list of roles for users
RemoveUserFromRole.snippet
Remove user from assigned role
RemoveUserFromSite.snippet
Remove user from site
RetrieveUsersInRole.snippet
Retrieve users in a role
SetPassword.snippet
Set password
UpdateRole.snippet
Update role
UpdateUser.snippet
Update user
Website Folder
AddnewSite.snippet
Add  new site
DeleteSite.snippet
Delete site
UpdateSite.snippet
Update site
Workflow Folder
ArchiveDocument.snippet
Archive document
GetWorkflowInformation.snippet
Retrieve workflow information
MoveToNextStep.snippet
Move to next step in workflow
MoveToPreviousStep.snippet
Move to previous step in workflow
 
Share this article on   LinkedIn

Thomas Robbins

I spend my time working with partners and customers extending their marketing and technology to the fullest.

Comments

Thom Robbins commented on

Thanks - I will check to see what's going on. I will update it with a signature that may also be causing an issue.

Anthony Leonard commented on

Hi,

seem to be getting an error trying to extract them - something about missing image in array, anyhow, here is a workaround....

1)
rename the extension to zip,
2)
extract the folders and file
3)
move them to a friendly location
4)
launch snippet manager and point it and the new folder from 2 above.

done [ignore any errors in the output panel!]

i haven't check all of the snippets to ensure they work but the few i have seem fine!

Thom Robbins commented on

These are for 2010. I built them using 2010. :)

Sean Cahill commented on

When are we going to see this available for Visual Studio 2010?