We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12968
    • 3 Posts
    Hi,

    at first, sorry for my bad English.

    I already posted my problem in the german Forum, but right now there’s too little activity so I try it here.

    How should I name the Template Variables to integrate my One-Level CSS-Navigation into my MODx Template?

    Several different approaches didn’t quite work.

    CSS:

    .menu {
    position: absolute;
    min-height: 330px;
    height: auto !important;
    height: 330px;
    width: 120px;
    left:0;
    padding-top: 50px;
    background-image: url(menu.jpg);
    background-repeat: no-repeat;
    }
    
    .menu a{
    color:#e3e0d0;
    font: 10px  Arial, sans-serif;
    font-weight: bold;
    margin-top: 2px;
    margin-left: 5px;
    padding-top: 2px;
    Padding-bottom: 2px;
    text-decoration:none;
    background-color:transparent;
    display:block;
    border-top:1px solid #99917d;
    border-right:1px solid #e4d9c0;
    border-bottom:1px solid #e4d9c0;
    border-left:1px solid #99917d;
    width:85px;
    }
    
    .menu a:hover{
    color: #330000; 
    background: #CBCBCB;
    font: 12px  Arial, sans-serif;
    border-top:1px solid #e4d9c0;
    border-right:1px solid #837c6b;
    border-bottom:1px solid #837c6b;
    border-left:1px solid #e4d9c0;}
    
    .menu a .dot{
    color:#e3e0d0;
    background-color:transparent;
    font-weight:bold;
    font-size:14px;}
    
    .menu a:hover .dot{
    color:#330000;
    background-color:transparent;
    font-weight:bold;
    font-size:14px;}
    
    .liste{
    position: relative;
    list-style-type: none;
    margin: 0 2px 0 0;
    padding: 5px !important;
    }
    
    .liste a{
    text-align: left;
    padding-left: 4px;
    margin-left:2px;
    }


    My Original HTML-Structure:

    <div class="menu">
    <ul class="liste">
    <li>
     <a href="#"><span class="dot">• </span>Neues</a>
    </li>
    <li>
     <a href="#"><span class="dot">• </span>Band</a>
    </li>
    <li>
     <a href="#"><span class="dot">• </span>Bio</a>
    </li>
    <li>
     <a href="#"><span class="dot">• </span>Media</a>
    </li>
    <li>
     <a href="#"><span class="dot">• </span>Kontakt</a>
    </li>
    <li>
     <a href="#"><span class="dot">• </span>Links</a>
    </li> 
    <li>
     <a href="#"><span class="dot">• </span>Archiv</a>
    </li>
    <li>
     <a href="#"><span class="dot">• </span>Impressum</a>
    </li>
    <li>
    </ul>
     </div>


    Hoping for help, Micha
    • If the code doesn’t change from page to page you could just use a {{chunk}}, and insert it into your page wherever it’s needed.

      Assuming you want to manually change it from page to page, a TV is the proper choice. Create a TV named anything you’d like, for example "menu" (w/o) quotes. In the default content section of the TV, place your HTML above. Put it in your template or content wherever needed via [*menu*]. Just put the CSS in any CSS file used in the template.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 2762
        • 1,198 Posts
        at first, sorry for my bad English - too laugh

        I’m not sure to understand....
        If you need to add a static menu (not dropmenu snippet) in your template, you can simply use a chunk, instead a TV.

        Simply, copy your html code in a new chunk and add {{ChunkName}} in your template

        If you nedd you can call a chunk from a TV using @CHUNK ChunkName
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

          MODx IT  www.modx.it
          -----------------------------------------------------

          bubuna.com - Web & Multimedia Design