We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    I am working an a multi lingual site and I need the option that I can use tv field names instead of the pagetitle etc to be used as title. is this possible?
    I know that it is not possible at the moment.

    If this is possible then a whole new way of creating multi lingual sites can be made by using just 1 doc for all languages.
    I have this already working for 2 languages but when its more then 2 I run out of usable "standard" input fields to use for page/menu title.

    Thank you for your time and this great snippet.

    Dimmy

      follow me on twitter: @dimmy01
      • 7455
      • 2,204 Posts
      Will this be possible or is it hard to do? I looked at the wayfinder code but its to high level of coding for my head. I really like it if it would be possible.

      It will give so much options for multilingual sites.

      Thank you for looking in to this.

      Dimmy
        follow me on twitter: @dimmy01
        • 7455
        • 2,204 Posts
        Bumb (sorry for that)
          follow me on twitter: @dimmy01
          • 7231
          • 4,205 Posts
          I have a simple solution that will blow your mind grin.

          I used the GetField snippet in the rowTpl (don’t forget the alternating [! !] and [[ ]]). THis way you can use any TV or document variable within the wayfinder Tpl. This was the rowTpl I tested it with:

          <li[+wf.id+][+wf.classes+]>
          	<a href="[+wf.link+]" title="[+wf.title+]" >[!GetField? &docid=`[+wf.docid+]` &field=`tvNameHere`!]</a>
          	[+wf.wrapper+]
          </li>


          This worked in a testing environment, should work live too.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don&#39;t know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 25663 MODX Staff
            • 12,272 Posts
            Cooll solution dev_cw smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 7455
              • 2,204 Posts
              Thats a great trick.
              now I can use wayfinder to handle more than 2 languages. no limits
              nice work

              When I finish this site I will try to write a wiki entry. (I have lots of snippets that should be released but my coding is ugly and my snippets are not that configurable.)
                follow me on twitter: @dimmy01
                • 7231
                • 4,205 Posts
                OK, I found out my solution is not that great...don’t worry it works fine. However, it turns out that you CAN use TVs in the tpl chunks in wayfinder as of version 2.0. Simply use [+tvname+] in the tpl chunk and it will work, this does not follow the standard WF syntax of [+wf.variable+].

                So the previous example could also work like this:
                <li[+wf.id+][+wf.classes+]>
                	<a href="[+wf.link+]" title="[+wf.title+]" >[+put_tv_name_here+]</a>
                	[+wf.wrapper+]
                </li>


                Merci to heliotrope for pointing out this well kept secret grin
                  [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                  Something is happening here, but you don&#39;t know what it is.
                  Do you, Mr. Jones? - [bob dylan]
                  • 7455
                  • 2,204 Posts
                  Its an old topic I know but,

                  Would still be nice if tv’s could be called in the call iteself:

                  TextOfLinks=`tvnamehere`
                  would this be hard to do?
                  make a mod for this?
                  the reason I ask is this:

                  I like to use wayfinder with multiple laguages and use tv’s for the menu title. so if I would want to do that I need to call like 3 snippets inside the wayfinder template.
                  its a hassle but it works but the above sugestion I gave would be better and more friendly.

                  Dimmy
                    follow me on twitter: @dimmy01
                    • 5070
                    • 36 Posts
                    Thank you, this took me a lot o time before finding out this topic.
                    grin grin grin
                      • 20343
                      • 3 Posts
                      Are there any solutions for using TVs in the Wayfinder call itself? Specifically, I would like to &sortBy a TV rather than being limited to only the specific doc variables listed in the eBook. This seems like it would be very useful to a lot of people. Since all the forum threads that refer to this are pretty old, maybe someone has a new way to do this? Please advise & thanks. Wayfinder and ModX are awesome!