We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18389
    • 169 Posts
    As a 60 year old virgin, time is really ticking so hurry up! wink
      www.markojokic.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      A nasty problem has been promptly solved...

      http://modxcms.com/forums/index.php/topic,52869.msg319053.html#msg319053

      http://github.com/modxcms/revolution/commit/01c5648629e8f51197f4f004b9fdf9cb2a0dd9e1#diff-1

      Editing the file specified fixed the problem (interestingly enough it still flashes the URL encoded version for a split second before settling down to show the expected string)
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        That fixed, I decided to try something else. So I removed the עברית context, and duplicated the "web" context, giving it the key "עברית". So now I have two contexts with the same resources already there. I’ll use the multilanguage lorem ipsum generator to generate some Hebrew noise to put in these pages on the Hebrew section and then see about getting a language menu working.
          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
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Well now that is very interesting! Wayfinder will work across contexts. If you specify a startId of a resource in any context, it will generate a menu based on that ID.

          A slight presentation problem that anybody using a RTL (right-to-left) language invariably runs into... the resource IDs in the Tree are scrambled a bit if the pagetitle is in the RTL language.
            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
            • 25663 MODX Staff
            • 12,272 Posts
            Hey Susan you found another bug. Could you file that one too? I recall that one from Evo a while back and they’re tricky to catch all those bits!
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Done.
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well, it appears there’s more of the utf8 urlencoding going on; couldn’t create a context setting for the context. So I removed it and used "hebrew" instead of the Hebrew characters. Somewhere the non-latin characters are being urlencoded (probably necessary for a URL string), but it needs to be unencoded somewhere earlier in the process so that all the functions will be using the unencoded string. Just unencoding the string in each function is going to be like playing Whack-a-Mole; every time somebody using such a string tries to do something else it will fail.

                I’ve noticed a lot of small usability issues in the Manager interface. Some of the content display blocks are too small. The package manager just leaves you hanging at the console, no indication that the installation has successfully concluded. Unless I didn’t wait long enough; but you can see the package list in the background, and the button has gone from Install to Uninstall. I suppose I should start screen-grabbing these, and keep a list of such annoying little issues.
                  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
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  The template has been adjusted, and now is looking pretty good. It’s a port of the Natural Beauties template, intended for photo galleries/blogs. It’s a bit unusual, and I rather like it. An online shop is pretty much a photo blog anyway, so it is appropriate. The CSS was adjusted a little bit to suit my own taste, but basically it’s the same as the free template package.
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                  <meta http-equiv="content-type" content="text/html; charset=[[++modx_charset]]" />
                  <title>[[*menutitle]] [[*longtitle]]</title>
                  <meta name="keywords" content="" />
                  <meta name="description" content="" />
                  <base href="[[++site_url]]"></base>
                  <link href="assets/template/css/default.css" rel="stylesheet" type="text/css" />
                  </head>
                  <body>
                  <div id="header">
                      <div id="logo">
                          <h1><a href="[[~[[++site_start]]]]">[[++site_name]]</a></h1>
                          <h2>[[*longtitle]]</h2>
                      </div>
                      <div id="menu">
                          [[Wayfinder? &startId=`0` &level=`1` &limit=`4`]]
                      </div>
                  <!-- end header --></div>
                  <div id="gallery">
                      <p>Stuff goes here</p>
                  <!-- end gallery --></div>
                  <div id="content">
                      <div id="posts">
                          [[*content]]
                      </div>
                      <div id="sidebar">
                          <div id="archives" class="boxed">
                                   <h2>Block 1</h2>
                                        <p>sidebar stuff
                          </div>
                          <div id="categories" class="boxed">
                                   <h2>Block 2</h2>
                                   <p>more sidebar stuff</p>
                          </div>
                  <!-- end sidebar --></div>
                  <!-- end content --></div>
                  <div id="footer">
                      <p id="copy">© 2008 [[++site_name]]. Content managed by <a href="http://modxcms.com">MODx</a>. Template by <a href="#">Free CSS Templates</a></p>
                  <!-- end footer --></div>
                  </body>
                  </html>
                  

                    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
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    I’ve installed two snippets using the Package manager now, and other than the minor user-friendliness issue I mentioned before, it is really great. I installed Wayfinder right away, of course, and you can see the Wayfinder snippet tags in the template listing in the previous post. Wayfinder for Revo is not different from Wayfinder for Evo; the ebook is just as wonderful for either version. Very simple; the trick is in the styling, which comes with the free template in its .css file.
                    /* Menu */
                    #menu {
                        height: 70px;
                    }
                    #menu ul {
                        margin: 0;
                        padding: 0;
                        list-style: none;
                    }
                    #menu li {
                        display: inline;
                    }
                    #menu a {
                        display: block;
                        float: left;
                        width: 140px;
                        height: 45px;
                        padding-top: 25px;
                        text-transform: lowercase;
                        text-decoration: none;
                        text-align: center;
                        letter-spacing: -2px;
                        font-size: 30px;
                        color: #B8BD52;
                    }
                    #menu a:hover {
                        color: #1A1A1A;
                    }
                    #menu .active a {
                        background: url(../images/img03.jpg) no-repeat;
                        color: #FFFFFF;
                    }
                    

                    I’ll probably change that limit from 4 to 5 or 6, since I’ve increased the width of the sections in the CSS. I still haven’t gotten exactly what the client (actually my partner, this is another one of his bright ideas that usually work out well but occasionally just wither and die) wants. I’m going to add a visitor-generated gallery of pet images for voting; the winner each month gets a free gift certificate or something.
                      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
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      The second snippet I’ve installed is the PHPThumb Output Filter (by Jared Loman, a very talented designer with whom it has been my great pleasure to work on a few projects, and soon to be an equally talented developer it appears). This is a wrapper for the phpthumb library, and now uses the certified safe phpthumb class files from the MODx core will be using that Revo core library as soon as a permissions bug can get ironed out!. It can be used either as a TV modifier or a stand-alone snippet. So that got me into TVs in Revo.

                      I created one TV, "image", for uploading/selecting an image. Works nice; the file manager is a bit clunky but works well. Another usability awkwardness, though - it took me a minute to figure out you need to click on the + "Add" button to open the local file selection window. But the very nice multiple file selection and upload feature is really nice. Then you need to double-click on your chosen image to load it into the TV field.

                      The second TV is for the content of the "gallery" block just under the menu in my template. I used a very basic phpthumb modifier for it (yes, the nested TVs work perfectly - I wonder how deep the nesting could go?)
                      [[*image:phpthumb=`&w=150&h=200&zc=1,class||myClass,title||myTitle,style||border: 1px solid #333`]]

                      Of course, I’ll need to change the class||myClass and title||myTitle options to something a bit more useful, but in this test it works just fine.
                        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