We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8609
    • 607 Posts
    Quote from: kOLDSQ at Feb 06, 2010, 02:53 PM

    Where is the "Wayfinder" ?

    Wayfinder is a snippet, it comes with the download of MODx. If you chose to install all the addons when you did your install it should already be present. If not, you may have to download it from MODx extras section on the website and install it.

    Here’s a tutorial on how to use Wayfinder to build a menu: http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/

      • 1011
      • 2 Posts
      Quote from: BobRay at Jan 26, 2010, 12:40 PM

      This might help: http://bobsguides.com/porting-your-site-to-modx.html

      Welcome to MODx. smiley

      Thanks for help. It’s great! smiley wink
        • 16148
        • 84 Posts
        Quote from: einsteinsboi at Feb 06, 2010, 03:05 PM

        Quote from: kOLDSQ at Feb 06, 2010, 02:53 PM

        Where is the "Wayfinder" ?

        Wayfinder is a snippet, it comes with the download of MODx. If you chose to install all the addons when you did your install it should already be present. If not, you may have to download it from MODx extras section on the website and install it.

        Here’s a tutorial on how to use Wayfinder to build a menu: http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/



        In my "Way finder" snippet, says it:
        <?php
        /*
        ::::::::::::::::::::::::::::::::::::::::
         Snippet name: Wayfinder
         Short Desc: builds site navigation
         Version: 2.0
         Authors: 
        	Kyle Jaebker (muddydogpaws.com)
        	Ryan Thrash (vertexworks.com)
         Date: February 27, 2006
        ::::::::::::::::::::::::::::::::::::::::
        Description:
            Totally refactored from original DropMenu nav builder to make it easier to
            create custom navigation by using chunks as output templates. By using templates,
            many of the paramaters are no longer needed for flexible output including tables,
            unordered- or ordered-lists (ULs or OLs), definition lists (DLs) or in any other
            format you desire.
        ::::::::::::::::::::::::::::::::::::::::
        Example Usage:
            [[Wayfinder? &startId=`1`]]
        ::::::::::::::::::::::::::::::::::::::::
        */
        
        $wayfinder_base = $modx->config['base_path']."assets/snippets/wayfinder/";
        
        //Include a custom config file if specified
        $config = (isset($config)) ? "{$wayfinder_base}configs/{$config}.config.php" : "{$wayfinder_base}configs/default.config.php";
        if (file_exists($config)) {
        	include_once("$config");
        }
        
        include_once("{$wayfinder_base}wayfinder.inc.php");
        
        if (class_exists('Wayfinder')) {
           $wf = new Wayfinder();
        } else {
            return 'error: Wayfinder class not found';
        }
        
        $wf->_config = array(
        	'id' => isset($startId) ? $startId : $modx->documentIdentifier,
        	'level' => isset($level) ? $level : 0,
        	'includeDocs' => isset($includeDocs) ? $includeDocs : 0,
        	'excludeDocs' => isset($excludeDocs) ? $excludeDocs : 0,
        	'ph' => isset($ph) ? $ph : FALSE,
        	'debug' => isset($debug) ? TRUE : FALSE,
        	'ignoreHidden' => isset($ignoreHidden) ? $ignoreHidden : FALSE,
        	'hideSubMenus' => isset($hideSubMenus) ? $hideSubMenus : FALSE,
        	'useWeblinkUrl' => isset($useWeblinkUrl) ? $useWeblinkUrl : TRUE,
        	'fullLink' => isset($fullLink) ? $fullLink : FALSE,
        	'nl' => isset($removeNewLines) ? '' : "\n",
        	'sortOrder' => isset($sortOrder) ? strtoupper($sortOrder) : 'ASC',
        	'sortBy' => isset($sortBy) ? $sortBy : 'menuindex',
        	'limit' => isset($limit) ? $limit : 0,
        	'cssTpl' => isset($cssTpl) ? $cssTpl : FALSE,
        	'jsTpl' => isset($jsTpl) ? $jsTpl : FALSE,
        	'rowIdPrefix' => isset($rowIdPrefix) ? $rowIdPrefix : FALSE,
        	'textOfLinks' => isset($textOfLinks) ? $textOfLinks : 'menutitle',
        	'titleOfLinks' => isset($titleOfLinks) ? $titleOfLinks : 'pagetitle',
        	'displayStart' => isset($displayStart) ? $displayStart : FALSE,
        );
        
        //get user class definitions
        $wf->_css = array(
        	'first' => isset($firstClass) ? $firstClass : '',
        	'last' => isset($lastClass) ? $lastClass : 'last',
        	'here' => isset($hereClass) ? $hereClass : 'active',
        	'parent' => isset($parentClass) ? $parentClass : '',
        	'row' => isset($rowClass) ? $rowClass : '',
        	'outer' => isset($outerClass) ? $outerClass : '',
        	'inner' => isset($innerClass) ? $innerClass : '',
        	'level' => isset($levelClass) ? $levelClass: '',
        	'self' => isset($selfClass) ? $selfClass : '',
        	'weblink' => isset($webLinkClass) ? $webLinkClass : '',
        );
        
        //get user templates
        $wf->_templates = array(
        	'outerTpl' => isset($outerTpl) ? $outerTpl : '',
        	'rowTpl' => isset($rowTpl) ? $rowTpl : '',
        	'parentRowTpl' => isset($parentRowTpl) ? $parentRowTpl : '',
        	'parentRowHereTpl' => isset($parentRowHereTpl) ? $parentRowHereTpl : '',
        	'hereTpl' => isset($hereTpl) ? $hereTpl : '',
        	'innerTpl' => isset($innerTpl) ? $innerTpl : '',
        	'innerRowTpl' => isset($innerRowTpl) ? $innerRowTpl : '',
        	'innerHereTpl' => isset($innerHereTpl) ? $innerHereTpl : '',
        	'activeParentRowTpl' => isset($activeParentRowTpl) ? $activeParentRowTpl : '',
        	'categoryFoldersTpl' => isset($categoryFoldersTpl) ? $categoryFoldersTpl : '',
        	'startItemTpl' => isset($startItemTpl) ? $startItemTpl : '',
        );
        
        //Process Wayfinder
        $output = $wf->run();
        
        if ($wf->_config['debug']) {
        	$output .= $wf->renderDebugOutput();
        }
        
        //Ouput Results
        if ($wf->_config['ph']) {
            $modx->setPlaceholder($wf->_config['ph'],$output);
        } else {
            return $output;
        }
        ?>


        Should i just delete that?
          • 8609
          • 607 Posts
          No, don’t delete anything from the snippet code, otherwise it won’t work! shocked What you need is to call the snippet into your template where you want your menu to appear, using the appropriate parameters. For example, you might put something like this in your template:

          [[Wayfinder? &startId=`0` &level=`1`]]

          Did you even look at the tutorial?


          Quote from: kOLDSQ at Feb 07, 2010, 07:30 AM


          In my "Way finder" snippet, says it:
          <?php
          /*
          ::::::::::::::::::::::::::::::::::::::::
           Snippet name: Wayfinder
           Short Desc: builds site navigation
           Version: 2.0
           Authors: 
          	Kyle Jaebker (muddydogpaws.com)
          	Ryan Thrash (vertexworks.com)
           Date: February 27, 2006
          ::::::::::::::::::::::::::::::::::::::::
          Description:
              Totally refactored from original DropMenu nav builder to make it easier to
              create custom navigation by using chunks as output templates. By using templates,
              many of the paramaters are no longer needed for flexible output including tables,
              unordered- or ordered-lists (ULs or OLs), definition lists (DLs) or in any other
              format you desire.
          ::::::::::::::::::::::::::::::::::::::::
          Example Usage:
              [[Wayfinder? &startId=`1`]]
          ::::::::::::::::::::::::::::::::::::::::
          */
          
          $wayfinder_base = $modx->config['base_path']."assets/snippets/wayfinder/";
          
          //Include a custom config file if specified
          $config = (isset($config)) ? "{$wayfinder_base}configs/{$config}.config.php" : "{$wayfinder_base}configs/default.config.php";
          if (file_exists($config)) {
          	include_once("$config");
          }
          
          include_once("{$wayfinder_base}wayfinder.inc.php");
          
          if (class_exists('Wayfinder')) {
             $wf = new Wayfinder();
          } else {
              return 'error: Wayfinder class not found';
          }
          
          $wf->_config = array(
          	'id' => isset($startId) ? $startId : $modx->documentIdentifier,
          	'level' => isset($level) ? $level : 0,
          	'includeDocs' => isset($includeDocs) ? $includeDocs : 0,
          	'excludeDocs' => isset($excludeDocs) ? $excludeDocs : 0,
          	'ph' => isset($ph) ? $ph : FALSE,
          	'debug' => isset($debug) ? TRUE : FALSE,
          	'ignoreHidden' => isset($ignoreHidden) ? $ignoreHidden : FALSE,
          	'hideSubMenus' => isset($hideSubMenus) ? $hideSubMenus : FALSE,
          	'useWeblinkUrl' => isset($useWeblinkUrl) ? $useWeblinkUrl : TRUE,
          	'fullLink' => isset($fullLink) ? $fullLink : FALSE,
          	'nl' => isset($removeNewLines) ? '' : "\n",
          	'sortOrder' => isset($sortOrder) ? strtoupper($sortOrder) : 'ASC',
          	'sortBy' => isset($sortBy) ? $sortBy : 'menuindex',
          	'limit' => isset($limit) ? $limit : 0,
          	'cssTpl' => isset($cssTpl) ? $cssTpl : FALSE,
          	'jsTpl' => isset($jsTpl) ? $jsTpl : FALSE,
          	'rowIdPrefix' => isset($rowIdPrefix) ? $rowIdPrefix : FALSE,
          	'textOfLinks' => isset($textOfLinks) ? $textOfLinks : 'menutitle',
          	'titleOfLinks' => isset($titleOfLinks) ? $titleOfLinks : 'pagetitle',
          	'displayStart' => isset($displayStart) ? $displayStart : FALSE,
          );
          
          //get user class definitions
          $wf->_css = array(
          	'first' => isset($firstClass) ? $firstClass : '',
          	'last' => isset($lastClass) ? $lastClass : 'last',
          	'here' => isset($hereClass) ? $hereClass : 'active',
          	'parent' => isset($parentClass) ? $parentClass : '',
          	'row' => isset($rowClass) ? $rowClass : '',
          	'outer' => isset($outerClass) ? $outerClass : '',
          	'inner' => isset($innerClass) ? $innerClass : '',
          	'level' => isset($levelClass) ? $levelClass: '',
          	'self' => isset($selfClass) ? $selfClass : '',
          	'weblink' => isset($webLinkClass) ? $webLinkClass : '',
          );
          
          //get user templates
          $wf->_templates = array(
          	'outerTpl' => isset($outerTpl) ? $outerTpl : '',
          	'rowTpl' => isset($rowTpl) ? $rowTpl : '',
          	'parentRowTpl' => isset($parentRowTpl) ? $parentRowTpl : '',
          	'parentRowHereTpl' => isset($parentRowHereTpl) ? $parentRowHereTpl : '',
          	'hereTpl' => isset($hereTpl) ? $hereTpl : '',
          	'innerTpl' => isset($innerTpl) ? $innerTpl : '',
          	'innerRowTpl' => isset($innerRowTpl) ? $innerRowTpl : '',
          	'innerHereTpl' => isset($innerHereTpl) ? $innerHereTpl : '',
          	'activeParentRowTpl' => isset($activeParentRowTpl) ? $activeParentRowTpl : '',
          	'categoryFoldersTpl' => isset($categoryFoldersTpl) ? $categoryFoldersTpl : '',
          	'startItemTpl' => isset($startItemTpl) ? $startItemTpl : '',
          );
          
          //Process Wayfinder
          $output = $wf->run();
          
          if ($wf->_config['debug']) {
          	$output .= $wf->renderDebugOutput();
          }
          
          //Ouput Results
          if ($wf->_config['ph']) {
              $modx->setPlaceholder($wf->_config['ph'],$output);
          } else {
              return $output;
          }
          ?>


          Should i just delete that?

            • 16148
            • 84 Posts
            yes, i did. But that was why i got confused laugh
              • 16148
              • 84 Posts
              Now i read the guide, and i got my menu working, but - i found one problem, www.tops-lemvig.dk

              My menu, isn’t vertical its horizontical.
              How do i "reverse" that.
                • 8609
                • 607 Posts
                Quote from: kOLDSQ at Feb 08, 2010, 11:15 AM

                Now i read the guide, and i got my menu working, but - i found one problem, www.tops-lemvig.dk

                My menu, isn’t vertical its horizontical.
                How do i "reverse" that.

                You have to style it using CSS to make it look the way you want it to. At the end of the tutorial I pointed you to there’s a link to a free ebook about Wayfinder. That will teach you everything you need to know about Wayfinder including how to style the items so your menu looks and acts like you want it to. Some knowledge about CSS is needed at this stage.

                Here is the link for the free wayfinder book: http://modxcms.com/forums/index.php/topic,34176.0.html

                Here is a link to start learning some CSS: http://www.w3schools.com/css/default.asp

                If you search on google you’ll find a ton of tutorials on how to style menus. So get that down, then apply it to Wayfinder using the instructions in the ebook and you’ll be good to go! smiley
                  • 16148
                  • 84 Posts
                  I’ve known with CSS, : i’ve made this site in CSS all by my selvf, yesterday
                    • 16148
                    • 84 Posts
                    i am sorry guys :/

                    but, i dont understand anything of it :/
                    cant i just do like this:
                     .menu {
                     
                     position: absolute; top: 12px; /* Position på skiften */
                     color: #ffffff;
                     text-decoration: none;
                     font-weight: normal;
                     font-family: Verdana; 
                     font-size: 14px; 
                     }
                    
                    
                     .menu ul{
                     
                     margin: 0px;
                     color: #000000;
                     text-decoration: normale; 
                     font-weight: normal;
                     font-family: Verdana; 
                     font-size: 14px; 
                     
                     }
                     
                     .menu li{
                     
                     margin: 0px 15px 0px 0px;
                     list-style-type: none;
                     display: inline;
                     color: #000000;
                     text-decoration: normale; 
                     font-weight: normal;
                     font-family: Verdana; 
                     font-size: 14px;

                    AND PUT THIS IN index.html

                    <div id="container">
                    
                    <div id="header">
                    <div style="clear: both; width: 100%; height: 234; visibility: hidden;"> </div> <!--Anti collapser i firefox-->
                    </div>
                    <div class="menu">
                    <div class="style">
                    <ul>
                    <li><a href="http://www.tops-lemvig.dk">» Startside</a></li>
                    <li><a href="http://www.tops-lemvig.dk">» Webshop</a></li>
                    <li><a href="http://www.tops-lemvig.dk">» Steel-Hosting</a></li>
                    <li><a href="http://www.tops-lemvig.dk">» Betingelser</a></li>
                    <li><a href="http://www.tops-lemvig.dk">» Support</a></li>
                    <li><a href="http://www.steel-hosting.dk">» Kontakt Os</a></li>
                    <li>              
                    <a href="http://www.steel-hosting.dk">» Kontrol Panel</a></li>
                    </ul>
                    </div>
                    </div>


                    I did in my other template.

                      • 8609
                      • 607 Posts
                      You can do that if you want. It just won’t be dynamic and you’ll have to hardcode add any pages you create to the menu. This kind of defeats the purpose of using a CMS and PHP in the first place.