Kentico Boilerplate MVC Site which is geared to provide a clean starting point with various Kentico features enabled and examples provided without added fluff.
- Install Kentico using normal instructions
- You can either create a blank MVC Site, or...
- You can use the
KenticoBoilerplate_SiteImport_Base.zip
to import the default example pages and page types.
- Replace the MVC site with the boilerplate site.
- Go to the CMS folder, and unzip
ConfigFiles_UnzipMe.zip
, place the 3 files in the CMS folder - Edit the config files as desired, MINIMUM the
ConnectionStrings.config
needs to be configured to point to your database you restored - Edit the
CMSHashStringSalt
in theAppSettings.config
needs a unique GUID added, do this in both the CMS and Boilerplate folder's AppSettings.config
- Replace the .gitignore with the unzipped
EntierCMS-GitIgnore.zip
as this will track all your CMS folders and files if you wish to track your entire repo- _*NOTE: You should not upload the CMS/Lib folder into any public repository, but you can use it for private repos such as Azure DevOps
- Unzip the
ConfigFilesForCMS_UnzipMe.zip
into your CMS Folder and configure your settings - Ensure that your
CMSHashStringSalt
in the App Settings matches for the MVC site and the 'Mother' (CMS) - If you wish, you can leverage the given
CI-Restore-UnzipAndModifyMe.zip
to use Continuous Integration- Unzip
CI-Restore-UnzipAndModifyMe.zip
'sCI-Restore.bat
file in the root of the solution (next toCI-Restore.ps1
) - Edit the
CI-Restore.bat
and modify the Path and AppPoolName to match that of your local instance (the App Pool Name should be the one for your Kentico Instance) - Create a backup of your database as the root (other developers will need to start from this point)
- You can now run the
CI-Restore.ps1
in the root of this solution to incorporate any CI changes in your repo.
- Unzip
*NOTE: Sometimes, depending on your system configuration, powershell scripts can be blocked if they originated from the internet, in which case you can simply copy the content of the powershell, delete the file, then create a new CI-Restore.ps1 and paste in the content, this way it originated from yourself.
If you wish to contribute to the boilerplate, please follow the following rules
- Keep Example
Controllers
,Models
, andViews
with a Prefix of Example, this will make it easier for users who are using the Boilerplate to remove all example material. - Please do not install other
NuGet
packages (Except theRelationshipsExtended
,RelationshipsExtendedMVCHelper
, andCSVImport
) without asking me first. - Please do not install Kentico Hotfixes, I wish to keep this boilerplate as close to the base (K12 SP1) as possible. You should of course hotfix your own sites you may build, even ones starting from the boilerplate, but only hotfix if you have no plans on contributing to the project.
- Comment well!
- Please feel free to include useful generic widgets and inline editors, just make sure they are indeed generic and useable in multiple situations.
The Boilerplate, while trying to be as minimalistic as possible, does contain some examples to help demonstrate the various methods or ways of doing things for those just starting out in MVC. If you want to remove these things, just do the following:
- Delete
Boilerplate/KenticoBoilerplate
- Delete
Boilerplate/Controllers/Examples
- Delete
Boilerplate/Controllers/PageTypes/KMVCHelper_GenericWidgetPageController.cs
- Delete
Boilerplate/Models/Examples
- Delete
Boilerplate/Models/CMSClasses
- Delete
Boilerplate/Views/Examples
- Delete
Boilerplate/Views/KMVCHelper_GenericWidgetPage
If you wish you can also uninstall the NuGet packages RelationshipsExtendedMVCHelper
if you are not using that module, and update the Kentico packages to whatever hotfix you are currently using (Boilerplate is on version 18).
For more information, please see me at www.devtrev.com
Sincerely, Trevor Fayas - Kentico MVP