cancel
Showing results for 
Search instead for 
Did you mean: 

Magento CSS Index

SOLVED

Re: Magento CSS Index

Hi Vimal,

 

Another issue I have found is trying to move the category description below the product grid on the category pages.

 

Below is the catalog_category_view.xml layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="content" before="category.products" />
        <move element="category.description" destination="content" before="category.products" />
        <move element="category.image" destination="page.top" before="breadcrumbs" />
        <move element="category.cms" destination="page.top" before="breadcrumbs" />
        <referenceBlock name="catalog.compare.sidebar" remove="true"/>
        <referenceContainer name="sidebar.additional" remove="true" />
        <referenceContainer name="page.top">
            <block class="Magento\Cms\Block\Block" name="catagory-and-product-page-usp-bar" before="breadcrumbs">
                <arguments>
                    <argument name="block_id" xsi:type="string">catagory-and-product-page-usp-bar</argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="footer">
            <block class="Magento\Cms\Block\Block" name="usp-bar" before="-">
                <arguments>
                    <argument name="block_id" xsi:type="string">usp-bar</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

I have added the below code to the Layout Update XML Section in my category

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="category.description" destination="content" after="category.products" />
    </body>
</page>

However the category description doesn't move at all, Any ideas?

Re: Magento CSS Index

For the indexing of Magento 2, the most recommended way out is to include stylesheets is to specify them in different layout files. Usually, the stylesheets you to include should be available for all other store pages. So as to achieve this, it includes your CSS in default_head_blocks.xml of the Magento_Theme module, that defines them command default <head> page section for all Magento pages. The recommended way to do this is adding an extending default_head_blocks.xml in your theme, and including the required stylesheets in this file. Your custom default_head_blocks.xml should be located as follows: <theme_dir>/Magento_Theme/layout/default_head_blocks.xml. To include a CSS file, add the <css src="<path>/<file>" media="print|<option>"/> block in <head> section in a layout file. <path> is specified relative to the theme web directory (<theme_dir>/web) For example, the following illustrates how stylesheets are included in the default Blank theme: <Magento_Blank_theme_dir>/Magento_Theme/layout/default_head_blocks.xml write the following code <page xmlns:xsi="http://www.w3.org/2001/XMLSchema..." xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="css/styles-m.css" /> <css src="css/styles-l.css" media="screen and (min-width: 768px)"/> <css src="css/print.css" media="print" /> </head> </page> and for indexing you may use this free extension by AurigaIt .

For even web development services you can contact a company for the same.

 

Re: Magento CSS Index

Indiatransform is ranked as the Top Website development services in Delhi. If you are thinking of taking your business online, simply contact us for the best website designing and development services. Hurry up!