We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21341
    • 26 Posts
    This question is related to How to include the template (header, sidebar, footer) in other sites?

    Including a modx site isnt that easy, and i thought you guys here might know the answer, for i think including wayfinder instead of including a modx site with wayfinder menu is nicer.

    My goal is to make a template for the SMF forum (better: SM forum) to include it to my modx site without losing the layout. The SMF brigde works fine at the backend, but the frontend....
    SMF kills the layout, because it calls a non modx site (in difference to the G2 module - works great).

    Any ideas?
      • 14050
      • 788 Posts
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 21341
        • 26 Posts
        Thanks for helping.

        zi just pointed me in the right direction, i discovered a MODxAPI, the perfect way to solve my problem.
        This code works and integrating search or other things might be easy with API:
        <?php
         
        $path = './';
        include_once($path.'modxapi.php');
         
        $modx = new MODxAPI();
        // connect to db and load settings
        $modx->connect();
        $modx->getSettings();
         
        
        $html= $modx->runSnippet('Wayfinder', array('startId' => '0', 'level'=>'2', 'hideSubMenus'=>'true'));
        echo $html;
         
        ?>