1
Yes, write a plugin method.
app/code/xxx/StoreCodeBodyClass/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Xxx_StoreCodeBodyClass',
__DIR__
);
app/code/xxx/StoreCodeBodyClass/etc/module.xml
<?xml version="1.0"?>
<config xmlns:xsi=&...
1
It is unclear from your question where the html element is on the product page that you wish to show/hide. If it is in the details.phtml template you can extend this in your module or theme at
Magento_Catalog\templates\product\view\details.phtml
Check for your custom attribute and apply the css class name to the html element you want to hide/show:
<?php
...
1
Add the following CSS:
.header.content .minicart-wrapper {
margin-left: auto;
}
.header.content .logo {
margin-right: auto;
}
OR
Remove flex: none!important from .header.content>*
1
Once you have the extension installed you can specify an order attribute in your css XML tags.
<head>
<css src="Namespace_Module::css/custom.css" order="100"/>
</head>
You can also use the order attribute in layout XML files such as
default_head_blocks.xml
Any css tags you don't specify an order for are treated as ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
css × 1239magento2 × 541
javascript × 218
magento-1.9 × 208
theme × 118
less × 88
layout × 83
html × 71
magento-2.1 × 67
frontend × 54
php × 48
xml × 37
less-css × 37
cache × 36
admin × 35
magento2.3 × 33
magento-1.7 × 27
magento2.2 × 24
magento-1.8 × 23
template × 23
module × 20
jquery × 20
phtml × 19
cms × 19
email-templates × 18