2017 © Pedro Peláez
 

magento2-module mage2hints

A Magento 2 extension that provides some useful debug information while developing

image

aleron75/mage2hints

A Magento 2 extension that provides some useful debug information while developing

  • Sunday, March 4, 2018
  • by aleron75
  • Repository
  • 1 Watchers
  • 9 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 6 Versions
  • 17 % Grown

The README.md

Magento 2 hints module

This module adds layout handles and template hints to generated page output as HTML comments., (*1)

It can be used by frontend developers to quickly spot the containers, blocks or UI elements that are used to compose the current viewed page., (*2)

Installation

Install module

You can install Magento 2 hints module through composer., (*3)

First add the repository accessing through HTTP protocol:, (*4)

php composer.phar config repositories.foo vcs https://github.com/aleron75/mage2hints.git

or accessing through SSH protocol:, (*5)

php composer.phar config repositories.foo vcs git@github.com:aleron75/mage2hints.git

Then add the dependency:, (*6)

php composer.phar require aleron75/mage2hints:~1.0

Alternatively you can manually add the dependency in your composer.json., (*7)

Accessing through HTTPS protocol:, (*8)

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/aleron75/mage2hints.git"
        }
    ],
    "require": {
        "aleron75/mage2hints": "~1.0"
    }
} 

Accessing through SSH protocol:, (*9)

{
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:aleron75/mage2hints.git"
        }
    ],
    "require": {
        "aleron75/mage2hints": "~1.0"
    }
} 

Once you have added the module dependency, run the following command from your project root:, (*10)

composer update

Enable module

After the composer update finishes updating dependencies, run the following commands from your project root:, (*11)

bin/magento module:enable Aleron75_Mage2Hints
bin/magento setup:upgrade

If you are in production mode, you also need to generate DI configuration and all non-existing interceptors and factories through the following command:, (*12)

bin/magento setup:di:compile

Usage

To add layout handles and template hints to page as HTML comments simply add an html parameter to the URL like shown below:, (*13)

http://magento2.local/?hints=true

Then you can inspect your HTML source code and expect seeing something like this:, (*14)

<body ...>
<!-- [LAYOUT_HANDLES] default - cms_index_index - cms_page_view - cms_index_index_id_home [/LAYOUT_HANDLES] -->
<!-- [CONTAINER  name="root"] -->
<!-- [CONTAINER  name="after.body.start" alias="after.body.start" parent_name="root"] -->
<!-- [BLOCK  name="googleoptimizer.experiment.script" alias="googleoptimizer.experiment.script" parent_name="after.body.start" type="Magento\GoogleOptimizer\Block\Code\Page" template_path=""] -->
...    
<!-- [/CONTAINER name="root"] -->
</body>

The Versions

04/03 2018

dev-master

9999999-dev

A Magento 2 extension that provides some useful debug information while developing

  Sources   Download

OSL-3.0

The Requires

  • magento/framework ~100.0|~101.0
  • php ~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0

 

The Development Requires

by Alessandro Ronchi

04/03 2018

1.0.5

1.0.5.0

A Magento 2 extension that provides some useful debug information while developing

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0
  • magento/framework ~100.0|~101.0

 

The Development Requires

by Alessandro Ronchi

01/03 2018

1.0.4

1.0.4.0

A Magento 2 extension that provides some useful debug information while developing

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/framework ~100.0|~101.0

 

The Development Requires

by Alessandro Ronchi

13/06 2017

1.0.3

1.0.3.0

A Magento 2 extension that provides some useful debug information while developing

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/framework ~100.0

 

The Development Requires

by Alessandro Ronchi

01/04 2016

1.0.1

1.0.1.0

A Magento 2 extension that provides some useful debug information while developing

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/framework ~100.0

 

The Development Requires

by Alessandro Ronchi

24/03 2016

1.0.0

1.0.0.0

A Magento 2 extension that provides some useful debug information while developing

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/framework ~100.0

 

The Development Requires

by Alessandro Ronchi