Created
January 11, 2019 16:15
-
-
Save StefanoChiodino/a9c26e683f5b0c29d8152aecd13f08d4 to your computer and use it in GitHub Desktop.
Umbraco document type grid editor CSS scoping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pipe(scopeCss('.umbraco-backend-scope')) | |
.pipe(insert.prepend(fs.readFileSync(path.resolve(__dirname, 'src/sass/_cms.scss'), { encoding: 'utf8' }))) | |
.pipe(rename({ | |
suffix: '-scoped' | |
})) | |
@{ | |
var titleHeader = new TitleHeader(Model); | |
if (Request.QueryString["dtgePreview"] == "1") | |
{ | |
<div class="umbraco-backend-scope"> | |
@Html.Action("RenderPartial", "TitleHeader", new { content = titleHeader }) | |
</div> | |
} | |
else if (titleHeader.ShowToVisitor()) | |
{ | |
Html.RenderAction("RenderPartial", "TitleHeader", new { content = titleHeader }); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment