We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    Cyberk, if I read your code correctly, do we only need to add ...

    .subTitle { position: fixed; top: 0; background-color: #EEF5FF; z-index: 1000; padding-bottom: 1px ! important; }
    


    ...to make the navbar stay on top?

    If so, I petition we add that to the default CSS.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I don’t think that works with IE.
        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
        • 6208
        • 44 Posts
        Susan is correct, the position: fixed CSS attribute does not work in IE. There are some hackish workarounds, but nothing that is really clean. It’s also slightly more complicated than just changing that line of CSS, because once you pull that div out of the regular document flow the rest of the document snugs up to the top of the page and sits underneath the .subTitle <div> and gets cut off. To get around this, the Greasemonkey script inserts a spacer <div> that pushes the rest of the content down so it doesn’t get cut off.

        In addition, a number of places in the site use the .subTitle class where you don’t necessarily want it to be fixed. In the case of the Greasemonkey script, it only inserts this custom CSS on pages that have a Save button.

        All that said, the buttons at the top of the page scrolling out of view is a pretty serious usability problem. If it’s not in the works for the next upgrade, I can look into some sort of simple mod that works in IE.
          • 25663 MODX Staff
          • 12,272 Posts
          The next upgrade definitely addresses it. The one after that actually will be a massive improvement in usability, loosing the frames-monstrosity.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 34017
            • 898 Posts
            Cyberk,

            I love the TV’s you have setup for your page. I am still trying to get my head around TV’s. Could you post how you have setup and used these TV’s (such as "This page has no subnavigation").

            Thanks for your work,
            Chuck
              Chuck the Trukk
              ProWebscape.com :: Nashville-WebDesign.com
              - - - - - - - -
              What are TV's? Here's some info below.
              http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
              http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
              • 6208
              • 44 Posts
              Hi Chuck,

              Here’s the best thing I can tell you to help you wrap your head around TVs: Forget the word TV and instead think of them as:

              Custom Fields

              That’s an oversimplification, but one that may make TVs easier to understand. You add any number of these custom fields (TVs) to your template, and then you can spit them back out in the resulting document in whatever form you want. Of course, it’s way more powerful than that, because you can also have the input of a custom field come not from the person editing/creating the document, but also from an external source like a text file or database call. And there are widgets to control the output of these custom fields as viewed in the page. But at their most basic, think of it as a way to capture user input in the editing interface and then to manipulate or display the information on the displayed page.

              Here’s how we use the "No Subnavigation" TV:

              First we set it up in the Template Variables interface to be a simple checkbox. The input option values are set to:

              This page has no subnavigation==1


              That means that if this checkbox is checked, the value will be 1.



              Which results in the TV looking like this in the editing interface:



              Then, at the top of all of our subsystem templates, we insert a simple snippet that checks the value of the noSubnav TV (custom field) to see if it’s set to 1. If so, it outputs some alternate CSS that removes the subnavigation from the page:

              $fields=$modx->getTemplateVarOutput(array('noSubnav'),$modx->documentIdentifier,1);
              
              $nosubnav=$fields['noSubnav'];
              
              if ($nosubnav) {
                 return '<link rel="stylesheet" href="../_css/basic.css" type="text/css" />';
              } else {
                 return;
              }


              So basically, when you apply a custom field (TV) to a template it can take input from the user or from an external source, and can display that input in the resulting document in any way you like, or you can use that input to programatically do something or display something else.

              I hope this helps!

              Cheers,

              Andrew
                • 34017
                • 898 Posts
                Andrew,

                This was great. Custom Fields is a great way to think about it- at least in the beginning for the basics. I also visited the old Etom forums today and read the original creator’s views on Document Variables (which has been enhanced for MODx to TVs).

                Thanks for your help,
                Chuck

                PS - (hope this is okay) - Here’s a link to the original author’s thoughts: http://www.etomite.org/forums/index.php?showtopic=809
                PPS - It looks like his plans have been greatly built upon. Yay! (its my birthday) Yay!
                  Chuck the Trukk
                  ProWebscape.com :: Nashville-WebDesign.com
                  - - - - - - - -
                  What are TV's? Here's some info below.
                  http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                  http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
                  • 33453
                  • 141 Posts
                  Hi Cyberk,

                  I am experiencing a conflict between this script and breezer’s excellent Manager Code Highlighter.

                  The "standard" save/duplicate/delete/cancel buttons and associated text are corrupted (see attached screen dump). The display is fine with the monkey disabled.

                  Can you please offer a solution, as I find both these fine utilities indispensible?

                  Thanks.
                    • 6208
                    • 44 Posts
                    Hi Zenmaster,

                    I’m guessing that the Manager Code Highlighter modifies the output HTML or CSS and that’s crashing into my Greasemonkey script (or vice-versa, really). Would it be possible for you to save the HTML of a page that is showing the conflict and post it or PM it to me so I can have a look?

                    Thanks,

                    Andrew