[RSS Feed/News] Getting Navigation Links via API

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hello,

I'm attempting to get Navigation Links via the API, to use for integration to a third party website. However, the content that is returned is challenging to work with. Im currently running the following code in my API:

PHP:

Code:
/** @var \XF\Repository\Navigation $navRepo */
$navRepo = $this->app->repository( 'XF:Navigation' );
$navTree = $navRepo->createNavigationTree();
$data = $navTree->getDescendants();

foreach ($data as $key => $navItem) {
    print_r("Key: " . $key . "\r\n")...

Read more
Read more about this Feed . . .
 
Status
Not open for further replies.
Back
Top Bottom