I added a custom category attribute via a module as this tutorial shows, that's working fine; the field is shown and saved correctly in the backend. But I can't figure out how to show it on the frontend.
I've added the attribute as a textfield, and it's content is supposed to be shown in a custom .phtml block that gets loaded on the category-view via XML.
I first tried to do it like you'd call a product attribute, i.e.
$_helper = $this->helper('Magento\Catalog\Helper\Output'); $_category = $block->getCategory(); echo $_category->getData('customcatattribute');
But no luck.
Then I found this answer and applied what it says, but still no luck.
Whenever I try to call the field I either get no results and the page works, or the page breaks and stays blank.
This shouldn't be too hard, how can I call my custom category attribute?