Unable to hide Products.Carousel.viewlet in version 1.1 - plone

Products,Carousel adds a viewlet to the plone.contentviews manager using some funky inline code in setuphandlers. I am trying to hide this viewlet. I have tried various techniques such as:
overriding the template in my configure.zcml
using the <hidden> tag in my viewlets.xml
But nothing seems to take effect. However if I go into ##manage-viewlets, I am able to hide it by hand.
How can i do this automatically on startup?

Not very elegant, but you could override the viewlet template using z3c.jbot if you're really desperate. Just provide an empty template called Products.Carousel.browser.viewlet.pt in your z3c.jbot templates folder, inside your custom product.

Related

Is there a way to reuse the built-in HTML editor in Cofoundry

I would like to embed Cofoundry's built-in administration interface visual editor in other custom non-admin pages. The idea is not to use any of the fancy attributes like [HTML], but rather be able to load the editor using low level JavaScript and HTML instead of installing yet another editor myself and use that.
I suppose it is a standard HTML editor, so given the URLs for it in Cofoundry, I assume it would be possible to use the editor's own standard documentation for embedding the editor.
So, question, which editor is it - and what are the built-in URLs (paths) to it's components?
As of v0.9 Cofoundry uses TinyMCE as the HTML editor. You'd be better off using your own build of the editor than linking to the Cofoundry source as it's liable to change.

Is there a way I can create (and update) a stylesheet using 2sxc and razor template?

DNN 9.3.2 / 2sxc 10.25.2
I have a DNN theme that I use for a certain type of subportal - I will have 8 subportals ultimately. Each subportal has the same layout, but they will have different colours in their respective theme. So I will have to create a stylesheet with the CSS rules and the colours for each theme. I know there is a couple of relatively simple ways I can do this:
Modifying the portal.css of each portal to override the theme or (simple but might be hard to maintain updates)
Building a custom theme for each portal (overkill)
Using SCSS to create a template with 8 different variable files (works fine but doesn't allow modifications by the Content Editors)
So, I'm curious if there's a more clever way through 2sxc that makes it easy for not only me to maintain, but also my portal's Content Editors.
I want to create 2sxc Content module with a few different fields for colour pickers that will allow me (and my content editors) to simply open up the 2sxc edit modal (on the homepage), fill out all the colour fields, and then a razor template will output the CSS template with the colours to override the theme styles on the DNN skin. I know I can do this with inline CSS but that would mean the module would have to appear on every page, and I'd also prefer to avoid inline CSS.
So my idea is that it would work like this:
Have a 2sxc Content module on a single page on each portal
Edit modal > the fields would be something like: primary colour (rgba), secondary colour (rgba), grey colour (rgba), etc
Once save is clicked, the template modifies a portal-level theme.css file which is loaded by the skin
Any changes to the module would result in a rewrite of the CSS file.
I could update the c# razor template to add, remove, or modify rules or transform the values of the input.
Is this possible or is it too complicated? Is there a better way of going about this?
So I've been away for a long time, I hope my answer will still help...
We have a very simple solution :). If you check out bootstrap instant template you'll see that we add various classes to the <body> tag.
https://github.com/2sic/dnn-theme-bootstrap4-instant/blob/master/controls/body-css-classes.ascx#L86-L91
That way we can just use normal CSS of the theme with rules based on portal-27 etc. to vary by portal.

How to change the woocommerce email template width?

I am trying to increase the email template width. And I am trying to modify the email-style.php, but it seems no way to change. How can I change it?
Thanks a lot.
The most useful one to copy is emails/email-styles.php and there you'll find the width is defined in two places at 600px; #template-container and #template-body but there's also all the other styles. Anything that is not defined but exists in the email can be added to this file.
I use an email preview plugin so I can see the effect in a web inspector.
if you wanted to be really clever you could include an external css file and then use scss to integrate with the rest of your site styles - eg colours.
The easiest and most common approach to do is to create a folder in your theme called woocommerce/ and then copy the entire templates/ directory from your woocommerce plugin or github into that. This will override the functionality from the plugin.
Here you can find the hardcoded table width.

Django CMS, per page CSS Styles

I often use small, page specific CSS files for a page in Typo3 using css_select. These styles usually apply only to some special element on these pages. Putting these styles in a global file doesn't feel right.
Using css_select I can select a bunch of files that may be included into the page's header, so that it loads it's special styles.
Now I'm looking for a way to do something similar in Django CMS 3. The only built in solution I'd know is to create a new template which seems a bit excessive for a single page where an image needs to be handled a bit differently from all the others, to name just one example.
Is there a way to do this using nothing but django CMS?
If not, is there an app that would do that?
If not, how could an app extend the page admin form in such a way that this function could be added.
You could extend the page.
See http://django-cms.readthedocs.org/en/latest/extending_cms/extending_page_title.html
A good example is https://github.com/nephila/djangocms-page-meta
This the above package allows you to add additional meta tags to page header.

Applying custom css to default theme in sharepoint 2010

I have created a custom styles css and registered it as follows in v4.master using SharePoint:CssRegistration option name="<% $SPUrl:~SiteCollection/Style ibrary/Custom.css%>" after="corev4.css" runat="server"/>
I assumed that my custom styling would be applied to any new site, however any new sites open in the standard default style, obviously I want my custom branding to automatically apply..
I have to mess around in site settings to use the parent theme etc, but even that does not always apply the styles correctly, so I have to go to the parent site and apply the parent styling to substitutes etc.
Other users will be using the site so I want to make it as easy as possible, can anyone offer help?
In order to apply your custom styles & master pages, you need to create sharepoint module (your styles, files & configuration) and Feature with Event receiver(when activated in sharepoint site/sitecollection, it'll apply your module, when deactivated, it rollback default settings related to styles/master page).
Here is the step-by-step article,
Article 1
Article 2

Resources