We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    For a simple site that only has the user browsing through pages in one section, you don’t need the [*lang*] TV or the [[SetLang]] snippet at all.

    For the three top-level menu items, you need to edit those three documents, and in the TopMenuStart TV (under the section for editing the content) you need to replace the default value with the ID of their parent, for the three under the English folder that will be the ID of the English folder, for the three under the German folder that will be the ID of the German folder. Now each of those six top-level pages will show the correct top menu, as will all of their children. For example, say the English folder is 1 and the German folder is 20. For the three folder/documents under the English folder, change the TV to "1". For the three folder/documents under the German folder, change the TV to 20. Now everybody should be showing the correct menu items for the top menu, the default on start, and whichever one the user chose if he wants to change languages.

      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
      • 32321
      • 29 Posts
      Quote from: sottwell at May 12, 2006, 10:19 AM

      For a simple site that only has the user browsing through pages in one section, you don’t need the [*lang*] TV or the [[SetLang]] snippet at all.

      For the three top-level menu items, you need to edit those three documents, and in the TopMenuStart TV (under the section for editing the content) you need to replace the default value with the ID of their parent, for the three under the English folder that will be the ID of the English folder, for the three under the German folder that will be the ID of the German folder. Now each of those six top-level pages will show the correct top menu, as will all of their children. For example, say the English folder is 1 and the German folder is 20. For the three folder/documents under the English folder, change the TV to "1". For the three folder/documents under the German folder, change the TV to 20. Now everybody should be showing the correct menu items for the top menu, the default on start, and whichever one the user chose if he wants to change languages.



      Hi,

      I think I’ll wait for the demo site. In the mean time I’ll read some code and learn some modx core...

      Thanks for your effort Susan

      WhiteHat
        • 32321
        • 29 Posts
        Quote from: sottwell at May 12, 2006, 10:19 AM

        For a simple site that only has the user browsing through pages in one section, you don’t need the [*lang*] TV or the [[SetLang]] snippet at all.........
        Quote from: sottwell at May 11, 2006, 11:40 PM

        You suggestion of a demo is a good one; I’ll try to take some time and make one up!


        Hi Susan,

        I am still stuck with the multilingual support for modx... , I really would not like to change the cms for my site but if I can’t have multilingual support I am afraid that I will need to find another solution. Your idea of implementation of multilingual support is a good one and probably works fine but I am not good enough to implement it.
        The suggestion of a demo was good I think, if you got some time to make one I think that would end my problems for the multilingual support.

        This is what I needed to implement just for reminder in case you have time to make a demo site: *F means Folder

        ---English F (Language)-MainFolder
        -----Fields F ( Goes in Top Menu)
        --------Docs ( Goes in Left Menu)
        -----News F ( Goes in Top Menu)
        --------Docs ( Goes in Left Menu)
        -----Support F ( Goes in Top Menu)
        --------Docs ( Goes in Left Menu)

        ---German F (Language)-MainFolder
        -----Fields F ( Goes in Top Menu)
        --------Docs ( Goes in Left Menu)
        -----Fields F ( Goes in Top Menu)
        --------Docs ( Goes in Left Menu)
        ----Support F ( Goes in Top Menu)
        --------Docs ( Goes in Left Menu)




        ---------------------------------------------------------------
        (TopMenu)
        Fields-------News-------Support (Language Menu)
        -------------------------------------------English-------German
        ---------------------------------------------------------------
        (LeftMenu) |
        DocsUnder Fields |
        |
        |
        |
        _______________________________________ _________________________________


        Thanks for your understanding and patience smiley

        All the best,
        WhiteHat
          • 32321
          • 29 Posts
          Hi again,

          I did manage to get the Language Menu and Top Menu display the folders/ contents accordingly like you explained in the PM that u sent to me a week ago or so, the only thing that was not clear is how to call the left menu. I’m attaching you the post for the solution that you offered me.


          English (only content is the FirstChildRedirect snippet)
          ---- Home
          ---- Fields
          ---- doc 1
          ---- doc 2
          ---- News
          ---- article 1
          ---- article 2
          ---- Support
          ---- doc 1
          ---- doc 2
          German (only content is the FirstChildRedirect snippet)
          ---- Home
          ---- Fields
          ---- doc 1
          ---- doc 2
          ---- News
          ---- article 1
          ---- article 2
          ---- Support
          ----doc 1
          ---- doc 2

          How you handle it from here depends on what you do on your site. If you have no login, you don’t need the cookie. You use DropMenu with a startDoc of 0 and levelLimit of 1 for the language menu.

          Your site start document (set in the system configuration in Manger) will be the Home page of whichever language you want to be the default.

          Clicking on "English" will take you to the English home page. The top menu will have DropMenu with a startDoc of whatever your English folder id is. Use a TV for that, with @INHERIT as the default value, and set the value in the TV only in the English folder/document.

          The same for the German folder. Set its StartDoc TV to its ID. Leave all the other document’s StartDoc TV as the default; this way they will inherit the value you set in the top level folder. So your top menu DropMenu will look like this:

          Code:

          [!DropMenu?startDoc=`[*StartDoc*]` &levelLimit=`1`!]



          The left menu will use either [*id*] or [*parent*] as the startDoc value, depending on which page you are on. Use a TV to contain the snippet call, and have the default value look like this:
          Code:

          <div id="leftmenu">
          [!DropMenu?startDoc=`[*parent*]`&levelLimit=`1`!]
          </div>
          

          This way, you only need to change the value [*parent*] to [*id*] for the three top-level pages. The second level pages will already be using the correct value!

          What would the TV look like for the Left Menu. and the Red Highlited text got me e bit confused. Sorry for this continual harrasment for the Multilingual issue.

          smiley
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            The TV would be [*parent*] by default (when you actually create the TV). In the TV for the three main folder/documents/ change that to [*id*]. Just leave it as [*parent*] for the submenu items. By setting [*parent*] as the default value when you create the TV, you don’t have to edit the submenu documents; they will already have the value they need.

            If your submenus go deeper than a single level, you would be better off putting @INHERIT as the default when you create the TV, then in the parent folder/documents change it to that document’s ID (the actual number, not [*id*]!). Now all of its children will inherit that value.
              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
              • 32321
              • 29 Posts
              Quote from: sottwell at May 19, 2006, 11:12 PM

              The TV would be [*parent*] by default (when you actually create the TV). In the TV for the three main folder/documents/ change that to [*id*]. Just leave it as [*parent*] for the submenu items. By setting [*parent*] as the default value when you create the TV, you don’t have to edit the submenu documents; they will already have the value they need.

              If your submenus go deeper than a single level, you would be better off putting @INHERIT as the default when you create the TV, then in the parent folder/documents change it to that document’s ID (the actual number, not [*id*]!). Now all of its children will inherit that value.

              Hey Susan,

              Got It.. thanks allot, it works perfectly, althought I noticed another thing about the DropMenu.... Can I actually dictate to the Drop Menu to list its links in Horizontal or Vertical mode according to my requirements.

              Cheers...
              WhiteHat
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                That’s done in the CSS, I would recommend articles from A List Apart on taming lists, and a Google search will find a lot of different ways to do that.

                http://www.google.com/search?hl=en&q=css+horizontal+menu&btnG=Google+Search
                  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
                  Or check out the resources in the FAQ... smiley
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 32321
                    • 29 Posts
                    Quote from: sottwell at May 20, 2006, 11:26 AM

                    That’s done in the CSS, I would recommend articles from A List Apart on taming lists, and a Google search will find a lot of different ways to do that.

                    http://www.google.com/search?hl=en&q=css+horizontal+menu&btnG=Google+Search

                    Hi Susan,

                    The CSS thing really rocks and you guys R great with all your support. I got the horizontal menu working aswell.
                    I have a bit of a challenge though, Is it actually possible to dictate to the horizontal DropMenu to pickup for each link different pictures on inactive hover and active?
                    For example I want to dictate to the DropMenu that for the Link home the gif that should be displayed would be on (inactive)Home-inactive.gif, on (hover)Home-hover.gif and on (active)Home-active.gif.... and so on for all the other links.

                    If that can be done from the css do u have an Idea how?, i tried with background-image on css but it only gets one gif , on inactive hover and active for all the links an not for one specific link... the other links should display other pics like Links-inactive.gif. Links-hover.gif and Links-active.gif........

                    Hope i am also beeing a bit of a challenge not only a pain in the a... grin

                    Cheers
                    WhiteHat

                    P.S Thanks goes to you Ryan 2 smiley
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Not as it is, however I have hacked the DropMenu snippet to add a unique id using the document ID that is current in the link-generating loop that gives each link a unique id for playing with in the CSS. It’s around here in the forums somewhere... ah, yes, here:

                      http://modxcms.com/forums/index.php/topic,4428.msg32251.html#msg32251
                        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