We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9728
    • 25 Posts
    thanks to susan i was able to dive into MODx. thank you very much!

    http://modxcms.com/forums/index.php/topic,22242.0.html this is my original post

    and this is what i got so far!

    1. i created a template for the whole site! it looks like this

    <!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">
    <head>
    <base href="[(site_url)]"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title> [*pagetitle*] | [(site_name)] </title>
    <link rel="stylesheet" type="text/css" href="[(base_url)]css/vanga.css" />
    </head>
    
    <body>
    
    <div class="all" id="all">
      <div class="navigation">
        NAVIGATION
        <div>
      <div class="content"> [*content*] </div>
    </div>
    
    </body>
    </html>
    


    heres the css

    .navigation {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	color: #FFFFFF;
    	background-color: #CC0066;
    	margin: 0px;
    	padding: 0px;
    	height: 200px;
    	width: 1024px;
    	left: 0px;
    	top: 0px;
    }
    .all {
    	color: #FFFFFF;
    	background-color: #009966;
    	left: 0px;
    	top: 0px;
    	right: 0px;
    	bottom: 0px;
    }
    .content {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	color: #FFFFFF;
    	background-color: #330099;
    	padding: 0px;
    	height: 568px;
    	width: 824px;
    	left: 0px;
    	top: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    	margin-left: 200px;
    }
    


    ok ... what i want to have now is that i that the navigation is static (for now, on step after another) and the content should be managed dynamically but i want that the author can choose between a 1 column and a 2 column layout.

    my question now is how i solve that static menu problem. how can i refer to a second document within my navigation and how can i manage it to deal with 1 and 2 column layouts? is different templates the solution?

    any recommendations or helpful hints, links or anything else is truly appreciated!

    thanks a lot
    firewireflow
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use the Wayfinder snippet for your menus. Download the doc for it and dig in. It’s quite flexible, to the point of actually being a mini-application on its own. By default it will generate a simple nested unordered list which you can style as you please in your CSS.

      As far as the one-or-two column issue, here’s where a TV would come in handy. It’s a bit difficult to understand TVs in the beginning, but it’s well worth it.

      Create a TV , give it a name (style) and description (style chooser) and just leave everything default, except in the "default value"; in that one put the name of your CSS file for the main use, I presume that would be the 2-column layout. Make sure to check the box at the bottom to assign it to your template! Now all documents using that template will have an editing field for the TV underneath the main content editing area.

      Now put the TV’s tag in your template’s head where you have the link to the css file.
      <link rel="stylesheet" type="text/css" href="assets/templates/mytemplate/[*style*].css" />

      Most pages will be perfectly happy with the default value you specified when you created the TV.

      Here comes the TV magic. On those pages where you want one column, just edit the TV (under the main content editing area) to have the name of your single-column css file. Now those pages will get that file linked to.

      You can get fancy and make the TV a dropdown so that when you edit the pages you can choose the css file from the dropdown, but we’ll keep things simple for now!
        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
        • 9728
        • 25 Posts
        thanks susan! you’re the bomb!

        i’ll probably talk to you soon wink

        flow
          • 9728
          • 25 Posts
          a small question ... in the tree is a number beside my documents ... what is that all about?

            • 25663 MODX Staff
            • 12,272 Posts
            Those are the document IDs. You reference them in snippets, chunks and content by using the syntax (using an example of Doc ID of 15):
            [~15~]
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me