Skip to content

Configuration

Jamie Pollock edited this page Feb 12, 2024 · 4 revisions

Rhythm Drop supports configuration for some of its functionality.

Rendering

This configuration is found under Rhythm:Drop:Rendering. Examples will be providing using JSON but any valid .net Options provider format is valid.

Here is the default configuration. As this is default configuration this config will not be required unless you need to override these values.

{
    "Rhythm": {
        "Drop": {
            "Rendering": {
                "DefaultTheme": "Default",
                "ViewPathPattern": "~/Views/Drop/{Theme}/{ViewType}/{ViewName}.cshtml",
                "ViewTypes": {
                    "Components": "Components",
                    "Modals": "Modals",
                    "Subcomponents": "Subcomponents"
                }
            }
        }
    }
}

DefaultTheme

This is the default theme used by tag helpers if no value is provided at runtime.

This feature is used by the IDefaultThemeHelper. If you have a custom implementation of this feature you may not use this setting.

ViewPathPattern

This is the pattern used to discover views paths for renderable items (e.g. Components, Modals or Subcomponents). This contains some tokens (ViewType and Theme are optional):

  • Theme: This token will be replaced by the current theme
  • ViewType: This token will be replaced by the current view type (e.g. Component, Modal or Subcomponent). The output value is determined by the ViewTypes configuration.
  • ViewName: This token will be replaced by the current item's view name

ViewTypes

These are values used by the {ViewType} replacement token.

Clone this wiki locally