Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Awesome package again!! Thanks a lot!
I have a question. Is there a default way to add css to the preview?
I'd like the content stack preview in the backoffice to look like the front end page. I'd like to stay away from inline styling.
I could of course add my css to the package manifest but is that the way to go? feels a bit like a hack...
Edit: I could add a inline style block in the partial when its not a front end request. That could work.
There isn't a built-in way to add CSS with StackedContent.
I'd recommend using the package.manifest to include your own CSS. I don't see it as a hack, it's an Umbraco extensibility point.
Matt wrote a post about it a while ago...
With a hack I was referring more to when I update StackedContent I'll probably overwrite the manifest.
Isn't the styling in the partial the preferred way?
You can go with inline styling, (it's up to you). I like to go with my own package.manifest for any back-office tweaks - that's my personal preference.
I'd advise not to modify the StackedContent one, as you say it would get overwritten on upgrade.
Ah, now I see what you mean. Thanks!
What I do with Stacked content is include my own package in app_plugins. I call it something like "BackofficePreviewHelpers" or "StackedContentPreviews".
The package manifest simply references a css file which is then loaded by Umbraco. This css files is created via my scss build process and only includes my stylings for back office previews of stacked content (and some other custom bits). This saves me duplicating styles/variables/etc for the scss and allows it to be used to generate my frontend and my back end styles.
This means you don't have to edit stacked content at all but still allows you to include your styles in the back office.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted