We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6947
    • 8 Posts
    Hey guys

    I shall keep this short and sweet - I’m trying to get Wayfinder up and running inside a site I’m developing and i thought i was having some issues with setting up my CSS, and wayfinder snippet calls BUT i can’t even seem to get the basic call working! Oh noes!

    I got MODx up and running no problems, have set up my template etc and then went and put this inside my template (lifted right from the Wayfinder documentation and mentioned in a ton of other forum posts and all over the wiki and tutorial pages):
     [!Wayfinder? &startId=`0`!]


    Now i was expecting too see a list of all the pages in my site (there are six); but i get nothing, no error, no sign of the snippet - nada! I moved [!Wayfinder? &startId=`0`!] out of the navbar DIV and into my main content area - to no avail.

    I must have missed something somewhere but i cannot for the life of me figure out what; any tips much appreciated. I need to get the basics working before i try anything fancy pants!

    Thanks and merry xmas
    D



    FYI - I’m working on the site here: http://www.deevee.co.uk/null/cms/
    The template for what you can see there looks like this

    <div class="sidebar">
    			<ul class="navigation">
    				<li><a href="#">contact</a></li>
    			        <li><a href="#">news</a></li>
    			       <li><a href="#">identity</a></li>
     etc...
    		         </ul>			
    		 </div>


    and the CSS looks like this

    ul.navigation {
    	list-style: none;
    	padding: 0;
    	margin: 0;
    }
    
    ul.navigation li {
    	font-size: 1.8em;
    	letter-spacing: .08em;
    	color: #d3222a;
    	margin-top: .5em;
    	margin-bottom: .5em;
    	padding: .3em;
    	
    }
    
    ul.navigation a {
    	font-family:Arial, Helvetica, sans-serif;
    	color: inherit;
    	text-decoration: none;


    Obviously i want to replace that with wayfinder.

    The main part of my page looks like this:

    		<div id="content">
    		 <h1>[*longtitle*]</h1>
     [!Wayfinder? &startId=`0`!]
    [*#content*]
    {{footer}}
    
            </div>
    


    But no list of documents appears...


      • 20413
      • 2,877 Posts
      You are sure you have assigned the doc to the right template?

      This is a nice tutorial how to set up your template with wayfinder:
      http://wiki.modxcms.com/index.php/Beginner’s_Guide_to_MODx

        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Could you please verify that the case matches? Is it spelled Wayfinder, WayFinder, wayfinder, wayFinder, etc...?

        Also could you clear your site cache to verify that’s not the problem?

        AMDbuilder
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 23299
          • 1,161 Posts
          Deevee,

          Welcome!

          I am still new at this myself. By the way you have presented your question very well. The title could include the word Wayfinder and its issue though.

          Did you build the basic structure of this page/site with standard static html and CSS first? I like to do so. Others may not. But my background is with static sites. I still find it’s’ a good idea to get the basic page working with the correct doctype and then make sure it validates. Its nice to sort out the markup and CSS issues on a clean simple page first. I then get a MODx install working and use my static page code and CSS to build the template. Working with MODx means putting several pieces of a puzzle together. I think some users inlcude too much content and navigation into their template. There are some decent wiki tutorials on how to strip your template down as much as pssoble using the MODx variable placeholders.

          I could not get your site link to work? Looking at your basic code it looks like you have not included the main column and sidebar code? Perhaps you can show the code that the parsed page will display?

          You will find the folks here incredibly helpful and patient. Quite often the really smart MODx gurus will explain what the issue is and how to handle the problem: they tell you exactly what you need to do. Sometimes the hurdle for a newby is  understanding what is actually being said. You may find yourself reading the posts six or more times carefully before getting the drift of what is being said. Be sure to explore the forum search function. This is the best tool for digging into previous questions that might have the same issue(s) you are experiencing.

          Max


            • 6947
            • 8 Posts
            Thanks for all your responses guys!

            Max:
            //amended post title; that better smiley I spend quite a bit of my time sorting out other peoples questions so i understand the value of a well asked question.

            In answer to your question - yes that is exactly what I did, it sounds like we have very similar approaches - i also am more used to building static sites so i got the layout and css and so forth how i wanted it first and then ported it into MODx removing content bit by bit and replacing it with dynamic TVs and chunks and so forth; following the tutorial on the wiki. My navigation code is still "static" as i’ve not got it working yet.

            The URL to my MODx install seems to be OK, i checked it out - is anyone else having any problems?

            I did have a quick scoot around the forums but it seems no one else has failed this early on in the Wayfinder process ha-ha.

            For reference the full markup of my template is at the bottom of the post.

            AMDbuilder:
            I have cleared my MODx cache and i made the Wayfinder snippet calls uncacheable by sticking them inside [! !] (or have i misunderstood the functionality of those enclosing exclamation marks?)
            My snippet for Wayfinder was installed with MODx and i have not changed the name - it is the standard "Wayfinder" case type; so i don’t think it was that.

            MrHaw:
            My Doctype was set to
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">


            The tutorial page states it should be:
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
            


            So i changed that....but it made no difference.

            Any other thoughts on the matter; I don’t think there are any problems with the way my MODx installation deals with snippets as my "random quotes" snippet is working just fine. My template code is pasted in below; please do take a look I really would appreciate it. I daresay it is something obvious and easy and I’m just have a moment of the stupids.

            Anyway - did everyone get what they wanted for xmas? Have a good day, thanks again

            D


            TEMPLATE (now with proper indents)
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
            	<head>
            		<base href="[(site_url)]"></base>
            		<title>[(site_name)] - [*pagetitle*]</title>
            		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
            		<link rel="stylesheet" href="[(base_url)]assets/templates/CKTS/CKTS.css" type="text/css" media="screen" />
            	</head>
            	<body>
            		<div id ="title-bg">
            			<div id ="title-container">
            				<div id="header">
            					<div class="sidebar">			
            						<ul class="navigation">
            							<li><a href="#">home</a></li>
            							<li><a href="#">blog</a></li>
            							<li><a href="#">dairy</a></li>
            						</ul>
            					</div>
            					<img src="[(base_url)]assets/templates/CKTS/images/headerlogo.png" width="730" height="211" />
            				</div>
            			</div>
            			<hr class="bar" />
            		</div>
                
            		<div id="main-container">
            			<div class="sidebar">
            				<ul class="navigation">
            					<li><a href="#">contact</a></li>
            					<li><a href="#">news</a></li>
            					<li><a href="#">identity</a></li>
            				</ul>			
            			</div>
            			<div id="content">
            				<h1>[*longtitle*]</h1>
            				[!Wayfinder? &startId=`0`!]
            				[*#content*]
            				[[Quotes]]
            				{{footer}}
            			</div>
                    </div>
                    
            		
            	</body>
            </html>
            


            and the accompanying CSS

            @charset "utf-8";
            body, html {
            	padding: 0;
            	margin: 0;
            	height: 100%;
            	background:#000000;
            }
            
            div.sidebar {
            	padding: .6em;
            	width: 200px;
            	float: left;
            }
            
            #header {
            	background-color: white;
            }
            
            
            #title-container {
            	width: 970px;
            }
            
            #title-bg {
            	width: 100%;
            	background-color:white;
            }
            #header div.sidebar {
            	background-color: white;
            }
            
            ul.navigation {
            	list-style: none;
            	padding: 0;
            	margin: 0;
            }
            
            ul.navigation li {
            	font-size: 1.8em;
            	letter-spacing: .08em;
            	color: #d3222a;
            	margin-top: .5em;
            	margin-bottom: .5em;
            	padding: .3em;
            	
            }
            
            ul.navigation a {
            	font-family:Arial, Helvetica, sans-serif;
            	color: inherit;
            	text-decoration: none;
            }
            
            
            #main-container{
            	width:970px
            }
            
            
            #content {
            	padding: .6em;
            	color: white;
            	float: left;
            	width: 730px;
            }
            
            .footer {
            	font-size: 0.8em;
            	color: #d3222a;
            	text-align:center;
            }
            
            .quote{
            font-size: 0.8em;
            	color: #ffffff;
            	text-align:center;
            	font-style: italic;
            }
            
            p {
            	line-height: 1.5;
            	margin-bottom: 2em;
            }
            
            
            
            hr.bar {
            	clear: both;
            	border: 0;
            	height: 0;	
            	border-top: .95em solid #d3222a;
            	padding: 0;
            	margin: 0;
            }
            
            h1{
            font-size: 125%;
            font-weight: bold;
            color: #d3222a;
            }
            






              • 3749
              • 24,544 Posts
              Try putting the following line at the top of the Wayfinder snippet code. That will tell you if the snippet is executing at all.

              die("Wayfinder Snippet is Executing");


              If you see that message on your web page, delete that line and then try changing your Wayfinder call to the following:

              [!Wayfinder? &startId=`0` &debug=`1`!]


              Let us know what that produces.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 3749
                • 24,544 Posts
                BTW, there are some problems with your HTML. I don’t think they’re related to the Wayfinder problem but they should probably be fixed first, just in case.

                Your <meta> tag needs a self-closing slash.

                Your character set is specified as ISO-8859-1 in the doctype, but as UTF-8 in the .CSS file. Those should match.

                smiley
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 23299
                  • 1,161 Posts
                  I see you are using two instances of the class=navigation. One is in the sidebar and one is in the header area. You are using the snippet call in the sidebar only.

                  I am no Wayfinder expert but that looks awkward to me. I would try putting all the navigation in one <ul> for now. Give the <ul> a name and then add the Wayfinder snippet call below that. I would then try creating new pages from the MODx Manager and give them some quick dummy content (a sentence will do). Make sure you tick the "show in menu" box and give it a menu title when creating the page in the "General" settings tab. Make sure the page is set to "published" in the "Page Settings" tab. Save each page and preview the site in a refreshed browser...

                  Later on you can investigate having two Wayfinder nav systems going at once. There are a lot of forum posts on this topic. But looking at your design, I think having one system to start makes sense while you wrap your head around all this. To change the color of the lower nav links you could some extra CSS with some <span> tags...

                  Max

                  PS: I see by the "dairy" link the theatre school is involved with milk products?
                    • 20413
                    • 2,877 Posts
                    Have you copy/pasted the static template file to create a new template item inside modx manager --> resources and assigned the docs to this template?  smiley

                    //I guess you did if you can have other snippets work.

                    I use transitional doc type as well.
                      @hawproductions | http://mrhaw.com/

                      Infograph: MODX Advanced Install in 7 steps:
                      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                      • 6947
                      • 8 Posts
                      Thanks again for all your responses

                      Max:
                      The dual use of my navigation class is a left over of the static HTML layout i was using to create the template; i was going to change this but I was having issues.

                      BobRay/Max: I have been a creature of the night recently so there have been a few... discrepancies in my coding, meta tags closed and charsets resolved thanks i hadn’t spotted those. And no - no cows are to be found among the calendar pages wink

                      I checked the published and show in menu situation on my pages; all were published and had the show in menu box ticked BUT after some digging things looked to be amiss. All my documents were showing up as orange in the document tree not green as they should have been. Un-checking -> saving -> rechecking the published setting for the pages resolved the issue:

                      www.deevee.co.uk/null/cms/

                      low and behold i have a list of pages!
                      Huzzah!

                      Looks like i had fallen foul of some bug or something. No matter - all fixed now - thanks to all who have aided me in this. Much appreciated!
                      Have a good new year and such
                      D