Skip to content

Commit

Permalink
Add note about how to add custom styles to the blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcemarc authored Jan 20, 2022
1 parent 6bfd18c commit de68dcf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/editors/content-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ To aid the preview, when using the `ContentBlockPreviewModel` declaration, there

If you are using the `UmbracoViewPage` declaration, the additional properties are available on the `ViewData` object: `@ViewData["elementIndex"]`, `@ViewData["elementIcon"]`, and `@ViewData["contentIcon"]`.

You can add a custom stylesheet to the backoffice to 'style' your block previews, by adding a folder in /app_plugins/ called 'ContentBlockStyles' and adding a 'package.manifest' file in there with the following:

{
"css": [ "~/App_Plugins/ContentmentBlockStyles/mycustomblockstylesheet.css" ]
}

You can then add your mycustomblockstylessheet.css file in there with your custom stylings. (Note these will effect the entire backoffice!)

> **Note:** The preview feature **does not work** on a freshly created new unsaved page. This is because the preview has no context of the page itself.

Expand Down

0 comments on commit de68dcf

Please sign in to comment.