Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Categories in menu #11

Closed
vickkeane opened this issue Mar 7, 2016 · 1 comment
Closed

Post Categories in menu #11

vickkeane opened this issue Mar 7, 2016 · 1 comment

Comments

@vickkeane
Copy link

Hi
How to get the post categories in top menu in this modules .
Thanks

@magefan
Copy link
Owner

magefan commented Mar 7, 2016

This is require custom development.

To get blog categories tree you can use this code

$categoryCollection = \Magento\Framework\App\ObjectManager::getInstance()
            ->create('Magefan\Blog\Model\ResourceModel\Category\Collection');

$categoeies = $categoryCollection
    ->addActiveFilter()
    ->addStoreFilter($this->_storeManager->getStore()->getId())
    ->setOrder('position')
    ->getTreeOrderedArray();

Similar to block
\Magefan\Blog\Block\Sidebar::getGroupedChilds
and template view frontend/templates/sidebar/categories.phtml

If you wont we can do it for you. You can contact us http://magefan.com/contact/ to get a quote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants