Skip to content

Instantly share code, notes, and snippets.

@sebastianrothbucher
Last active February 6, 2019 11:25
Show Gist options
  • Save sebastianrothbucher/fbca026b108f8ccfd8592d0b7d443f01 to your computer and use it in GitHub Desktop.
Save sebastianrothbucher/fbca026b108f8ccfd8592d0b7d443f01 to your computer and use it in GitHub Desktop.
Magento (2.2) debug comments for layout
two patches
- AbstractBlock.php (toHtml)
- Layout.php (_renderContainer)
667a668
> $html = ($this->getData('_cms_avoid_comment') ? $html : ('<!-- Start '.$this->_nameInLayout.' ('.(property_exists($this, '_template') ? ($this->_template.', ') : '').((property_exists($this, '_data') && array_key_exists('type', $this->_data)) ? $this->_data['type'] : '-').') -->'.$html.'<!-- End '.$this->_nameInLayout.' -->'));
604a605
> $html = '<!-- Start '.$name.' (container) -->'.$html.'<!-- End '.$name.' -->';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment