1

Still learning my feet with magento2. I've found the phtml file I want to call the description and short description from but I've been unable to find the calls needed.

Would it be safe to assume it's the same, different, or a better solution?

3

This might depend on exactly what template you are looking to inject this into. With that said, you should start out by looking into the description template in the Catalog Module:

/vendor/magento/module-catalog/view/frontend/templates/product/view/description.phtml

You are going to need to reference the Catalog Helper to get access to the attribute set.

$this->helper('Magento\Catalog\Helper\Output')->productAttribute($block->getProduct(), $block->getProduct()->getDescription(), 'description')

| improve this answer | |
0

To add on to @Tyler's answer. To get the short description you can use the following:

     <?= $block->getCurrentCategory()->getShortDescription(); ?>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.