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

    a few months ago I created some sort of an interactive tutorial about the use of some Wayfinder properties for beginners - in German. Having finished the lengthy work of translation now I would like to share it with you:

    ottogal :: ymodx

    (Start by changing the language to English. If you then bookmark the URL you never have to do it again.)

    I'm looking forward to any feedback here in the forum.

    Please read all the explanations and try it out - and don't hesitate to correct/improve my sometimes weird English.

    I only could test it in Firefox 8.x and 9.0.1 and in Explorer 8 under Windows 7 - please check other browsers and environments, too.

    I'd like to express my thanks to all the members of both this forum and the German one (http://www.modxcms.de/forum/) who helped me to overcome a number of hurdles.

    It's for a while that I'm learning a lot here, so I think it's time to give back a bit.
    (More recently Bob Ray's really helpful book became indispensable!)

    Prosit! (Latin for "may it be useful!")
    and kind regards
    ottogal

    Edit:
    Added "(Revo)" to the thread title. [ed. note: ottogal last edited this post 11 years, 11 months ago.]
    • This is for the Revo version of Wayfinder. I believe that there are some differences from the Evo version.
        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
        • 29076
        • 615 Posts
        Yes, this is for the Revo version, and maybe it should be moved to a Revo forum. But that said, it's just Great!. Thanks for making this. It's very helpful.
          I think, thererfor I am! But what I am, and why...?
          • 22427
          • 793 Posts
          You're right, I should have made it more evident. I will add some hint on the Explanations>Versions page (and modify the title of the starting post).

          The reason why it's made in Revo: It was my first "sincere" try of Revo.
          And after that experience I share many of the critical arguments in the discussion
          bringing-evolution-development-back-to-life/.
          I'm glad to see how vivid it is, and that there is not just a discussion but really work done by Stefanie and the other contributors like you, Susan. (My own developping skills regretfully are by far too poor to be able to help.)

          So why not redo my "Wayfinder Demo" for Evo? It's a question of time (of which I lost a lot in struggling with Revo - no details here...). (And how would I simulate the lexicon feature?)

          That said I think that also users of Evo and the Evo version of Wayfinder can win some insight playing a bit with "Wayfinder Demo".

          Kind regards
          ottogal
            • 19369
            • 1,098 Posts
            Very nice work. Where are you using lexicon in the tutorial?
              • 22427
              • 793 Posts
              To make it multilingual - that is, bilingual up to now.
              (Are you interested to translate it into Italian? ;-) ).

              If you click the button English, the intro page will be reloaded with the added parameter ?lang=en - so this choice is retrievable from the $_SESSION variable through a snippet, [[!get_lang_par]]:
              <?php
              if ( isset($_SESSION['lang']) ) {
                  return $_SESSION['lang'];
              } else {
                  return 'de';
              };

              I created a namespace multiling and the lexicon files
              core/components/multiling/lexicon/de/default.inc.php and
              core/components/multiling/lexicon/en/default.inc.php
              which contain, e.g., the entries
              $_lang['ml.xpls'] = 'Beispiele';
              and
              $_lang['ml.xpls'] = 'Examples';
              respectively.

              Now the examples' page as Menu Title has to become a language tag:
              [[!%ml.xpls? &namespace=`multiling` &topic=`default` &language=`[[!get_lang_par]]`]]
              

              To display the correct title also in the page's title bar, in the template I have
              <title>[[++site_name]] | Wayfinder Demo | [[*menutitle]]</title>
              instead of the normally used [[*pagetitle]].

              The content of a page is always a static resource chosing the appropriate chunk using a modifyer. For instance, the static resource for the start page, intro.html, just contains
              [[!get_lang_par:is=`de`:then=`[[$de_intro]]`:else=`[[$en_intro]]`]]

              where [[$de_intro]] and [[$en_intro]] are the chunks of the content in the different languages.

              Maybe all this could have been made simpler. But it was my way out after spending much fruitless time trying the Babel add on or other context related solutions... [ed. note: ottogal last edited this post 11 years, 11 months ago.]
                • 19369
                • 1,098 Posts
                I see, on Evolution you can try with YAMS, you can also simply duplicate the tree and translate each branch in the language you want (see this). I have not time at the moment for a translation because I am working on MODX Evolution manager theme, but I will do it when I find some time.
                  • 22427
                  • 793 Posts
                  Duplicating the tree would mean to duplicate the whole demo menu tree too, what I wanted to avoid. (I'll have a look at YAMS, but doesn't it use duplicated resources too?)
                  I have not time at the moment for a translation because I am working on MODX Evolution manager theme ...
                  Nice job, by the way!
                  ...but I will do it when I find some time.
                  That would be great. (In that case I'd send you the chunk files...)
                    • 19369
                    • 1,098 Posts
                    YAMS does not duplicate the tree.
                      • 22427
                      • 793 Posts
                      A tiny improvement: The link text of a menu item owning the class first no longer gets a green text color but the font-style italic, instead. Hence the optical markings for different classes would not disturb each other also in the case of the classes first and last. (The explanation hints have been adapted.)