We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42964
    • 22 Posts
    Hey guys, Im a beginner so any help would be appreciated

    So I have made a template in modx using a css code and have finished the home page but i do not know how to get the navigation working the only thing that works is the home page when i preview my site and when i click on about us or contacts it just reloads the page and i still stay at the home page ? In the css files i have downloaded it has other html files so could i somehow link these to contacts or about? ill add a picture so you know what i mean, Thanks !
    <nav>
    <ul id="menu">
    <li id="menu_active"><a href="index.html">Home</a></li>
    <li><a href="about.html">About</a></li>
    <li><a href="services.html">Services</a></li>
    <li><a href="testimonials.html">Testimonials</a></li>
    <li><a href="contacts.html">Contacts</a></li>
    </ul>
    </nav>

    " target="_blank" rel="nofollow">
    " target="_blank" rel="nofollow">

    This question has been answered by BobRay. See the first response.

    [ed. note: lucifier last edited this post 13 years, 7 months ago.]
    • discuss.answer
      • 3749
      • 24,544 Posts
      In the default MODX setup, the content on each page is stored in the database. Most people use the Wayfinder extra to create their menus, but if you want to roll your own, you'd create the pages in MODX, make a note of their ID numbers (in parentheses in the tree at the left) and use those in MODX link tags (these IDs are made up, you'd have to use the real ones).


      nav>
      <ul id="menu">
      <li id="menu_active"><a href="[[~1]]">Home</a></li>
      <li><a href="[[~3]]">About</a></li>
      <li><a href="[[~7]]">Services</a></li>
      <li><a href="[[~8]]">Testimonials</a></li>
      <li><a href="[[~12]]">Contacts</a></li>
      </ul>
      </nav>


      MODX will replace the link tag with the URL of the document with the specified ID.

        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
        • 42964
        • 22 Posts
        Hey,
        I honestly can't thank you enough for helping me with this, I had been trying for the past 5-6 hours and you helped me in just minutes..... Thanks heaps !!
        Quote from: BobRay at Mar 02, 2013, 10:00 PM
        In the default MODX setup, the content on each page is stored in the database. Most people use the Wayfinder extra to create their menus, but if you want to roll your own, you'd create the pages in MODX, make a note of their ID numbers (in parentheses in the tree at the left) and use those in MODX link tags (these IDs are made up, you'd have to use the real ones).


        nav>
        <ul id="menu">
        <li id="menu_active"><a href="[[~1]]">Home</a></li>
        <li><a href="[[~3]]">About</a></li>
        <li><a href="[[~7]]">Services</a></li>
        <li><a href="[[~8]]">Testimonials</a></li>
        <li><a href="[[~12]]">Contacts</a></li>
        </ul>
        


        MODX will replace the link tag with the URL of the document with the specified ID.

          • 42964
          • 22 Posts
          I would also like to change the color of a specific text(I have made it bold below), how would I go about this ? Thanks !

          <div class="wrapper">
          <h1><a href="#" id="logo">Valet5 <span> Carpet Cleaning</span></a></h1>
          <ul id="icons">
          <li><a href="#"><img src="assets/valet files/images/icon1.gif" alt=""></a></li>
          <li><a href="#"><img src="assets/valet files/images/icon2.gif" alt=""></a></li>
          <li><a href="#"><img src="assets/valet files/images/icon3.gif" alt=""></a></li>
          </ul>
          </div>
            • 3749
            • 24,544 Posts
            It would be very difficult with that HTML. The "right" way would be to enclose that text in it's own span and use CSS to set the color.

            The quick-and-dirty way would be this:


            <h1><a href="#" id="logo"><span style="color:red">Valet5<span><span> Carpet Cleaning</span></a></h1>


            or

            <h1><a href="#" id="logo"><span style="color:#FF0000">Valet5<span><span> Carpet Cleaning</span></a></h1>

              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
              • 42964
              • 22 Posts
              The dirty way it is laugh, one last question, why does the website look all out of line and half of it cut out if viewed from internet explorer ? Thanks !
                • 3749
                • 24,544 Posts
                Do you mean the Manager or the front end -- and what version of IE? If it's the front end, it may be because there's something wrong with your HTML or CSS. You can check the HTML for validity here http://validator.w3.org/
                  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
                  • 42964
                  • 22 Posts
                  Yup I checked it for validity and found 25 errors although they look like little errors to me ? when on my website when I click on about or any of the navigation items it takes me to my home page and upon clicking it the second time it then takes me to the proper page ?
                    • 3749
                    • 24,544 Posts
                    Do you have this tag in the head section of all templates?

                    <base href="[[++site_url]]" />


                    Personally, I would fix the validation errors.
                      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
                      • 42964
                      • 22 Posts
                      Nope, this is what i have in the head sections :
                      <!DOCTYPE html>
                      <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
                      <head>
                      <title>Valet5</title>
                      <meta charset="UTF-8" />
                      <link rel="stylesheet" href="assets/valet files/styles/reset.css" type="text/css" media="all">
                      <link rel="stylesheet" href="assets/valet files/styles/layout.css" type="text/css" media="all">
                      <link rel="stylesheet" href="assets/valet files/styles/style.css" type="text/css" media="all">
                      <script type="text/javascript" src="assets/valet files/scripts/jquery-1.4.2.js" ></script>
                      <script type="text/javascript" src="assets/valet files/scripts/cufon-yui.js"></script>
                      <script type="text/javascript" src="assets/valet files/scripts/cufon-replace.js"></script>
                      <script type="text/javascript" src="assets/valet files/scripts/Myriad_Pro_400.font.js"></script>
                      <script type="text/javascript" src="assets/valet files/scripts/Myriad_Pro_300.font.js"></script>
                      <!--[if lt IE 9]>
                      <script type="text/javascript" src="assets/valet files/scripts/ie6_script_other.js"></script>
                      <script type="text/javascript" src="assets/valet files/scripts/html5.js"></script>
                      <![endif]-->
                      </head>

                      These are some of the errors i get, how would i go about fixing these ?

                      Bad value assets/valet files/styles/reset.css for attribute href on element link: Whitespace in path component. Use %20 in place of spaces.

                      Bad value assets/valet files/scripts/cufon-yui.js for attribute src on element script: Whitespace in path component. Use %20 in place of spaces.

                      Bad value [[~4]] for attribute href on element a: Illegal character in path component.

                      Unclosed element strong.
                      <p class="pad_bot1"><strong> Domestic Stain Removal