Comments (5)
Hi,
Just to rephrase to get an idea, you are looking for a way to add explicit "None" display option, this option does not add any CSS classes to the content area item wrapper element and make it default everywhere (in all content areas for newly added blocks)?
from optimizely-advanced-contentarea.
Yes, that was the idea I had at the time. I just needed a way for the default to not add the css classes unless a specific layout option was chosen. I found a workaround for the moment. In an initialization module I turned off all the built in display options and then added them all back in, but changed the tag used for the full width option. This tricked your renderer into not putting the default full width css classes since the hard-coded default tag doesn't exist in the display options. So the "automatic" choice now behaves like this and worked beautifully without having to add an explicit "none" option. Its not ideal but it works for now.
from optimizely-advanced-contentarea.
great that you found workaround within existing functionality. default global display option is nice feature request anyways.
would you mind sharing your init module code?
from optimizely-advanced-contentarea.
Yeah, that would be great coupled with a discreet "None" option that disables the css classes as well. I could not get a none option to work in my experimentation. I tried to set all the css patterns to empty strings but it ignored them. The closest I got was to setting all the width settings to zero, which didnt match up with any css styles and were ignored. Here is my init module code:
` ConfigurationContext.Setup(ctx =>
{
ctx.DisableBuiltinDisplayOptions = true;
// override display options so that the default is not full width
// so we can avoid adding the bootstrap classes unless the user
// specifically requests them to be added by choosing a size.
ctx.CustomDisplayOptions.AddRange(new[]
{
new DisplayModeFallback
{
Name = "Full width (1/1)",
Tag = ContentAreaTags.FullWidth + "-width",
LargeScreenWidth = 12,
MediumScreenWidth = 12,
SmallScreenWidth = 12,
ExtraSmallScreenWidth = 12,
Icon = "epi-icon__layout--full"
},
new DisplayModeFallback
{
Name = "Three quarters width (3/4)",
Tag = ContentAreaTags.ThreeQuartersWidth,
LargeScreenWidth = 9,
MediumScreenWidth = 6,
SmallScreenWidth = 12,
ExtraSmallScreenWidth = 12,
Icon = "epi-icon__layout--three-quarters"
},
new DisplayModeFallback
{
Name = "Two thirds width (2/3)",
Tag = ContentAreaTags.TwoThirdsWidth,
LargeScreenWidth = 8,
MediumScreenWidth = 6,
SmallScreenWidth = 12,
ExtraSmallScreenWidth = 12,
Icon = "epi-icon__layout--two-thirds"
},
new DisplayModeFallback
{
Name = "Half width (1/2)",
Tag = ContentAreaTags.HalfWidth,
LargeScreenWidth = 6,
MediumScreenWidth = 6,
SmallScreenWidth = 12,
ExtraSmallScreenWidth = 12,
Icon = "epi-icon__layout--half"
},
new DisplayModeFallback
{
Name = "One third width (1/3)",
Tag = ContentAreaTags.OneThirdWidth,
LargeScreenWidth = 4,
MediumScreenWidth = 6,
SmallScreenWidth = 12,
ExtraSmallScreenWidth = 12,
Icon = "epi-icon__layout--one-third"
},
new DisplayModeFallback
{
Name = "One quarter width (1/4)",
Tag = ContentAreaTags.OneQuarterWidth,
LargeScreenWidth = 3,
MediumScreenWidth = 6,
SmallScreenWidth = 12,
ExtraSmallScreenWidth = 12,
Icon = "epi-icon__layout--one-quarter"
}
});
});`
from optimizely-advanced-contentarea.
v5.3 is on the way to the feed
from optimizely-advanced-contentarea.
Related Issues (20)
- CVE-2022-34716 (Medium) detected in system.security.cryptography.xml.4.4.2.nupkg, system.security.cryptography.xml.4.4.0.nupkg
- WS-2022-0161 (High) detected in newtonsoft.json.9.0.1.nupkg, buildbundlerminifier.3.2.449.nupkg
- CVE-2018-1285 (High) detected in log4net.2.0.8.nupkg
- CVE-2020-1045 (High) detected in microsoft.aspnetcore.http.2.0.0.nupkg
- Add Support for V12 HOT 2
- CVE-2021-26701 (High) detected in system.text.encodings.web.4.4.0.nupkg
- CVE-2022-41064 (Medium) detected in system.data.sqlclient.4.4.0.nupkg
- Trying to add this package in CM 12.23.0 and getting dependency injection error HOT 1
- DisplayOptions.Default giving an error "'DisplayOptions' does not contain a definition for 'Default' " HOT 1
- CVE-2021-23369 (High) detected in handlebars-1.3.0.tgz - autoclosed HOT 1
- CVE-2021-23383 (High) detected in handlebars-1.3.0.tgz - autoclosed HOT 1
- CVE-2017-16116 (High) detected in underscore.string-2.3.3.tgz - autoclosed HOT 1
- CVE-2021-32804 (High) detected in tar-0.1.20.tgz - autoclosed HOT 1
- CVE-2021-23413 (Medium) detected in jszip-2.5.0.tgz - autoclosed HOT 1
- CVE-2018-8292 (High) detected in system.net.http.4.3.0.nupkg
- CVE-2019-0820 (High) detected in system.text.regularexpressions.4.3.0.nupkg
- CVE-2017-0256 (Medium) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 1
- CVE-2017-0247 (High) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 1
- CVE-2017-0248 (High) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 1
- CVE-2017-0249 (High) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optimizely-advanced-contentarea.