Changing the default units of measurement units of Shopware 6 - shopware

I want to change the default unit of measurements mm and kg to m and g.
How is this possible?

This is hard-coded in the Shopware core.
To change it, you would need to extend the administration theme (and probably also the store front, if this is displayed there).
For example it needs to be changed here sw-product-packaging-form.html.twig:
<template #suffix>
<span>mm</span>
</template>

Related

kendo angular 2 grid rtl header issue

while using the angular 2 grid in RTL, the fields are aligned correctly, but the header fields are not, both the content and the fields themselves.
you can do an easy test - just use the regular grid, and add dir="RTL" in the HTML tag,
unless I am missing something and I need to add something else?
thanks
The Grid component officially doesn't support RTL mode yet. You can keep track for the state of readiness of the packages here - https://github.com/telerik/kendo-angular/issues/96

How to span a number of columns, regardless of the nested grid context?

I need to set the width of an element that is used in various places in my fluid Susy layout. The parent element is not always the same width, but I want this element to always have the same width relative to the page width.
Example:
In a 12-column grid, a news article sometimes spans 12 columns, sometimes 6. Editors are able to add a <blockquote> in the news article text. I want a blockquote to always be 3 columns wide (relative to the full page), regardless of its context (12 or 6 columns).
Of course if this was a grid with fixed column widths it would be easier, but I'm looking for a fluid, percentage-based solution.
PS. I am willing to use Susy 2 alpha if that makes it easier to solve the problem.
You would do this the same way in Susy 1 or 2, though it's always more fun in 2. :)
The issue isn't really related to anything specific about Susy, it would be a problem in any fluid CSS situation. You can only solve it if you have a hook for knowing which context you are in. At that point, you can solve it from either end. Something like this:
blockquote {
#include span-columns(3);
.narrow & { #include span-columns(3,6); }
}
There really isn't any way to do it without the hook. CSS doesn't have element-queries (and isn't likely to any time soon, for the reasons given in that article).

Orchard CMS: Add a stylesheet to a page

Setup:
I am using Orchard CMS 1.6.
I have a site where I need to be able to set the background color of the whole page. Ie, I need to style the body tag.
I could use the LayoutSelector module and have distinct layouts. However, the only difference in each layout is that the background-color rule for the body tag is different. So it seems a very un-dry way of doing things.
I can't find any way to make Vandelay.Classy add a distinct id or class to the body tag (it adds, as I understand it) an id or a class to the outer tag of a content type. In my case, that isn't the body tag.
So that is no good, I really do need to customize the body tag.
How to do this?
Note:
I need 3 different background colors. I also have a two column layout and a three column layout. [I use (a modified version of) the layoutSelector module to achieve this.] So to have 3 different colors of background, and I used layouts to achieve this, I would need 6 different layouts: TOTAL overkill.
There must be a better way...
From any cshtml file, you should be able to access the Layout shape. From pretty much anywhere else, you can still get to the Layout shape through WorkContextAccessor. Once you have a reference to the Layout shape, you can do Layout.Classes.Add("the-class-you-want").

How can I use alternate shape templates in different zones on the same page?

I'm trying to create a theme in orchard. I have a main content zone and a sidebar zone which is on the right of my main content area (2 column layout). The main content area displays a list of blog posts (including tags, etc. Standard Orchard behaviour).
In the sidebar I would like to display the recent blog post widgets. However, the standard widget renders tags, published date etc. I do not want to display this information in the sidebar zone.
The placement file does not seem to be the right place to configure this as I can't specifically target the Parts_Tags_ShowTags shape in the sidebar zone. Neither does it seem to be possible to create a new template like Tags.ShowTags-Sidebar.cshtml
Any suggestions on how to modify/hide a shape in one zone on a page but not the other?
You can either use an alternate (shape tracing can help with that) or take this over entirely (see this post for details: http://weblogs.asp.net/bleroy/archive/2011/03/27/taking-over-list-rendering-in-orchard.aspx)

XSL-FO overflows width when flowing from page-master with wide region-body to narrow (including column-width changes) in Apache FOP and XMLSpy

I'm using XSL-FO (Formatting Objects) in XMLSpy with Apache FOP.
When I flow content from a first page having a simple-page-master with a wide region-body onto a second (rest) page having a narrow region-body, the content on the second page has the same width as the content on the first page, overflowing the body. This also happens if I set the column-count on the second page to be greater than the column-count on the first page.
How do I force the engine to recognize that the available horizontal space has been decreased, and adjust the body (or column) width accordingly?
An example of the problem can be seen here (use with any XML document that contains sufficient text content to flow from page 1 to page 2):
http://pastebin.com/VGyWYNBS
filling in with randome text, your xsl-fo works well with a commercial formatter,
one column first page, three on the second and third pages?
I submitted this to Apache using Bugzilla:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50794
Chris Bowditch posted this response there:
the problem you describe is known as
Changing IPD problem. That is a known
issue in 0.95. For v1.0 we developed a
fix for it that works in most cases.
There are some limitations related to
lists and tables, but for regular
text, upgrading to FOP v1.0 should
resolve your problems.

Resources