We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    I just installed MODx and tried to do as the tutorial wants. Initially, it went OK.
    First problem: I created a new template, and it showed up right. Just by guessing (!) I found out where the MODx-template expects the CSS-file to be. But within that CSS-file I defined an image-url as a background. Where to put it? I just uploaded it (via FTP) to the same location as the CSS-file. But the image didn’t show up.
    Second non-working issue: I inserted the [[MenuSnippet&id_’0’&activelink=’active’]] in the template.
    The only stuff that appeared was a lot of JS-code, some of it defined display-mode to be "display:none". Why?
    Where the heck does all this JS-stuff come from?
    I created a new content-folder with a new page containing some blind text, arguing that most of the stuff in the root-level is "special purpose" like 404page and others. Result: nothing showed up at all, the space between my "menu-divs" (i.e. the snippet-stuff) was plain empty! Are my links not matching a strange ’active’ attribute? And what does "activelink" mean? And what are the semantics of an active activelink? Very Strange!
    I tried to check out the background/configuration of the MenuSnippet but didn’t find a resource named MenuSnippet - is it just a generic item? But the tutorial handled it differently.
    Right now, another issue came to my mind: If the menu just reflects the file/folder-structure, how can I control which pages should appear on the page and which not? And, after trying to find an answer in the forums, the mix-up between stuff stored in the database and stuff stored in the file-system is merely confusing. For example: you have a template-folder. So, if I create a new template I expect it to appear in this folder. But it doesn’t: it gets buried in the database. (BTW: how can I change the template used for the WHOLE site, not just for individual pages??)
    Very miraculous. Well guys: I still believe that MODx is the most convenient CMS on this planet - but the flat learing-curve promised does not match my expectations. I guess you tried your best - but instead of trying you should have a REAL newbie being part of it.

    I solved some of the problems mentioned by replacing "MenuSnippet" with "DropMenu". But I’m still clueless on how to reproduce my hover-effects, which worked with:

    <a href="index.html" class="menu">
    <img src="ar_void.gif" class="passive" /><img src="ar_red.gif" class="active" /> Start
    </a>

    and the following CSS:

    a:hover IMG.passive{
    display: none;
    }

    a:hover IMG.active{
    display: inline;
    }

    Any advice or tips?
    huh
    • 1. Any background image defined in a css file will be relative to that file’s location. So if your css file is in /assets/templates/MyNewTemplate/style/mystyle.css, and the image is in /assets/templates/MyNewTemplate/images/bg.jpg, then your style would need to be url(../images/bg.jpg. This really has nothing to do with MODx; treat your template and your CSS as you would any HTML file.

      2. As you surmized, the "MenuSnippet" mentioned is a generic name. Replace with the name of whatever menu snippet you are using, such as DropMenu. If you are referring to JS code in your "view source" HTML, that’s most likely from QuickEdit.

      3. When you create a new document, whether it’s a folder or not, you have to "publish" it. In the System Configuration section you can set whether or not documents are published by default; the default installation setup is not published. If your new stuff shows up red in the Document Tree panel on the left of the Manger page, then it’s not published. If it’s orange, then it’s not going to show in the menu.

      4. Along these same lines, to determine what shows in the menu or not is a) is the document published and b) is the "Show in menu" checkbox checked. Not all snippets honor that setting, however, especially older ones written before that feature was added.

      5. Templates are stored in the database. Auxilary files, such as template background files and css files, are stored in the /assets/templates/<whatever>/ folder. Or anywhere you like, actually, just make sure your links to your css files are correct in your template. Set the site’s default template in the System Configuration section of the Manager.

      6. DropMenu generates a simple nested unordered list. Style according to your needs. There are a ton of tutorials online for styling unordered list menus in just about any way you could want. There are also a lot of examples and tutorial posts in this forum on the subject.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • And don’t use single-quotes, use backticks, the key found to the left of the top-row 1: `.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 34162
          • 1 Posts
          OK, thanks a lot for your advice! I’ll try to find a MODx-expert here in Berlin - just to flatten my learning-curve.
          That not single-quotes but accents are required is one of my greatest learnings, though. grin