Skip to main content

Advanced Documentation

File structure for DeSales

Resource Package

The resource package is found in ~/ResourcePackages/DeSales. The "DeSales" package is a modified version of the default "Bootstraps" resource package that comes with Sitefinity.

  • ~/ResourcePackages/DeSales/assets/src/project
    Contains all the js and css used on the site. Once you have made changes or additions to this folder you will need to run Grunt to compile it. The compressed files grunt generates will be placed in ~/ResourcePackages/DeSales/assets/dist/
    • Any .js files that are created will need to be referenced in the ~/ResourcePackages/DeSales/assets/jsfiles.json to be included in the minified distribution version
  • ~/ResourcePackages/DeSales/client-components/fields/html-field/sf-html-field.sf-cshtml 
    This file is the default settings for the WYSIWYG editor used in the MVC feather components.
  • ~/ResourcePackages/DeSales/GridSystem/Templates
    Contains the options that show up for the “Page Layouts”
  • ~/ResourcePackages/DeSales/MVC
    Contains the Views of Default Sitefinity Components (Such as card and navigation) as well as Views for all Content Types, both default (such as new) and custom (such as faculty).
    • Adding a new view is as simple as adding a new file in the folder of what you are creating a view for.
    • If you are creating views for a new content type, you will need to make a new folder. Reference current custom content types to see naming convention.
      • List.****.cshtml will add your view as an option to the dropdown on the List settings.
      • Detail.*****.cshtml will add your view as an option to the dropdown for the single settings.
      • You can copy the code that is generated for you in the “Widget Templates” area and paste it into your new file to get started.
    • Files in the /Layouts/ folder are not actually “Page Layouts”. They are used in the Page templates. We have only created one for you and all others are based off that one. We only recommend creating new Layouts in this folder for content that appears separate from the website.

More about Sitefinity Resource Packages asset management can be found here: https://docs.sitefinity.com/best-practices-manage-assets-in-resource-packages

Custom Components

Custom components are pieces of your site that were specially created for DeSales. They go beyond what is available from out of the box components.

These are housed in ~/Mvc and follow standard Model, View, Controller practices.