We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30693
    • 5 Posts

    Nice site. I see the problem. Which version of YAMS are you using?
    Thanks! I just upgraded to 1.1.4 and that solved the default language problem.

    The new multilingual aliases is working great except for the site start document. The default alias, the norwegian alias and the english alias are all set to "athene".

    http://www.athene-prosjekt.no/ gives the site start in the default language for new visitors, or the current language if the cookie has been set.
    http://www.athene-prosjekt.no/no/ gives the site start in norwegian.
    http://www.athene-prosjekt.no/no gives a 404.
    http://www.athene-prosjekt.no/en/ gives a 404.
    http://www.athene-prosjekt.no/en gives a 404.
    http://www.athene-prosjekt.no/no/athene gives the site start in norwegian.
    http://www.athene-prosjekt.no/en/athene gives the site start in english.

    Why is the file name needed to display the english page? Is it possible to get a redirect to the language root url from the site root?


    I found a problem by the way. If you search for, say, ’project’, then the results get inserted into document in the wrong place at the top of the page.

    I had a typo in my template, thanks for notifying me.


    I haven’t tried this before, but if you haven’t done so already then you might want to configure your different language AjaxSearch snippet calls to only search in the multilingual tvs corresponding to that language.

    Thats the way I did it, and it works great, except that AjazSearch never displays the excerpt from the content field, just the pagetitle with link.


    Truls, Norway
      • 22851
      • 805 Posts
      Quote from: trulss at Sep 03, 2009, 05:50 AM

      The new multilingual aliases is working great except for the site start document. The default alias, the norwegian alias and the english alias are all set to "athene".
      I’m aware of that problem. I have already fixed it in my local copy. Please replace your yams.plugin.inc.php file with the attached one. That should fix it (I hope)!
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 30693
        • 5 Posts
        Quote from: PMS at Sep 03, 2009, 06:15 AM

        I’m aware of that problem. I have already fixed it in my local copy. Please replace your yams.plugin.inc.php file with the attached one. That should fix it (I hope)!

        Yes, that fixed the redirect! But, would it be possible get URLs without the site root alias to work for both languages?


        Truls, Norway
          • 22851
          • 805 Posts
          Quote from: trulss at Sep 03, 2009, 06:32 AM

          But, would it be possible get URLs without the site root alias to work for both languages?

          I set it up like that (the alias is only hidden for the site start page in the default language) because that works in the general case: Even if the server names are the same for all languages and the site start document is at the root, it is still possible to determine which document and language variant was intended. In your case the server names are unique so this isn’t an issue. I could consider making it a special case in future.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
            • 19149
            • 8 Posts
            Hello again!

            When i call Wayfinder with tpl from yams...It fills blank fields.
            Templates use - &from=`pagetitle` and &from=`menutitle`, and if one of this is blank...i get blank.
            In Wayfinder without yams tpl - automatic choose nonblank field (from menutitle,pagetitle...)
              • 32396
              • 56 Posts
              Hi,

              I’m using AjaxSearch with custom &ResultTpl and without ajax. (site with 2 languages EN/RU-default)

              This call is on the result page (56), for En, and for RU withTvs=`+:pagetitle_ru...
              [!AjaxSearch? &AS_showResults=`1` &ajaxSearch=`0`, &AS_landing=`56`, &AS_showForm=`0` &language=`(yams_mname)` &withTvs=`+:pagetitle_en,longtitle_en,introtext_en,description_en,content_en` &tplResult=`SearchResultTpl`!]


              This is in main template (search without Ajax):
              [!AjaxSearch? &moreResultsPage=`56` &AS_landing=`56` &addJscript=`0` &extract=`0` &AS_showResults=`0` &ajaxSearch=`0` &language=`(yams_mname)` &tplLayout=`SearchFormTpl` &withTvs=`+:pagetitle_en,longtitle_en,introtext_en,description_en,content_en`!]


              This is a template for result:
              <div class="[+as.resultClass+]">
                <a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
              [+as.descriptionShow:is=`1`:then=`
                <span class="[+as.descriptionClass+]">[+as.description+]</span>
              `+]
              [+as.extractShow:is=`1`:then=`
                <div class="[+as.extractClass+]"><p>[+as.extract+]</p></div>
              `+]
              [+as.breadcrumbsShow:is=`1`:then=`
                <span class="[+as.breadcrumbsClass+]">[+as.breadcrumbs+]</span>
              `+]
              </div>


              When I browse in English and search in English for example: "news" on the page displays:

              pagititle in russian and URLs without prefix wwww.example/en/...

              -------------------------------------------------------------
              Тестовая Новость
              ...текст на русском языке... This is first test news , Here is short summery of first news ..., This is full content of first news ...you can add imag...
              -------------------------------------------------------------

              How can get search results in current language and correct URLs?

              Thanks


                Using: MODx Evo 1.0.6 / Revo 2.2.5
                • 25483
                • 741 Posts
                The plugin works perfect, I launched a site with it this week:


                I did not use the latest version that also has translated aliases support, maybe I will use that one in a new project when needed! smiley
                  with regards,

                  Ronald Lokers
                  'Front-end developer' @ h2o Media

                  • 16183
                  • 1,390 Posts
                  Quote from: MediaGuy at Sep 04, 2009, 02:56 PM

                  ....I launched a site with it this week:



                  Nice sites btw, MediaGuy! smiley

                  cheers/k
                    • 22851
                    • 805 Posts
                    @Wild Striker

                    A YAMSified version of BreadCrumbs version 1.0.1 attached. Please can you test it?

                    I haven’t been able to get to the bottom of the random misplaced template variable fields when viewing the tabbed document view. I too have experienced this. As far as I’m concerned, YAMS is sending ManagerManager the fields in the correct order. So, perhaps it is a bug in ManagerManager.

                    I haven’t yet myself tried getting AjaxSearch to work with YAMS. It seems @trulss got around the problem that AjaxSearch is outputting monolingual URLs by using ’current’ as the redirection mode. I’ll certainly try out your example when I have a chance.

                    If AjaxSearch outputs a document id template variable, like [+as.id+], then in your templates you could try replacing placeholders like [+as.pagetitle+] with [[YAMS? &get=`content` &from=`pagetitle` &docid=`[+as.id+]`]] and any urls by (yams_doc:[+as.id+])

                    Quote from: Mikhail at Sep 04, 2009, 08:18 AM

                    When i call Wayfinder with tpl from yams...It fills blank fields.
                    Templates use - &from=`pagetitle` and &from=`menutitle`, and if one of this is blank...i get blank.
                    In Wayfinder without yams tpl - automatic choose nonblank field (from menutitle,pagetitle...)

                    I didn’t know that Wayfinder behaved like that. Sorry Mikhail, but I haven’t got a good solution at the moment. One way of working around it might be to use PHx to test for the empty fields - but I don’t recommend it because it would be quite inefficient.

                    @MediaGuy.

                    Thanks for sharing your YAMS site(s)! Looks great. I particularly like the Darwin monkey boy: http://www.st-artgallery.com/art/charles-darwin-monkey-boy.1.html
                    If you don’t mind, I’m going to add it to the top post of this thread.
                      YAMS: Yet Another Multilingual Solution for MODx
                      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                      • 32396
                      • 56 Posts
                      Hi, again smiley

                      Quote from: PMS at Sep 04, 2009, 05:52 PM

                      @Wild Striker

                      A YAMSified version of BreadCrumbs version 1.0.1 attached. Please can you test it?
                      - tasted and when I call [[BreadCrumbs]] a get empty output.


                      I haven’t been able to get to the bottom of the random misplaced template variable fields when viewing the tabbed document view. I too have experienced this. As far as I’m concerned, YAMS is sending ManagerManager the fields in the correct order. So, perhaps it is a bug in ManagerManager.
                      - thanks for trying!


                      I haven’t yet myself tried getting AjaxSearch to work with YAMS. It seems @trulss got around the problem that AjaxSearch is outputting monolingual URLs by using ’current’ as the redirection mode. I’ll certainly try out your example when I have a chance.

                      If AjaxSearch outputs a document id template variable, like [+as.id+], then in your templates you could try replacing placeholders like [+as.pagetitle+] with [[YAMS? &get=`content` &from=`pagetitle` &docid=`[+as.id+]`]] and any urls by (yams_doc:[+as.id+])
                      - GREAT! It worked just perfect! the only problem left is a placeholder [+as.extract+]. In English search [+as.extract+] display search result in 2 languages:

                      ...текст на русском языке... This is first test news , Here is short summery of first news ..., This is full content of first news ...you can add imag...

                      - how can I output only in current?

                      P.S.
                      And I have on more question about PHx and Ditto pagination (not displaying).
                      This is my ditto call:
                      [!Ditto? &parents=`10` &display=`10` &tpl=`Content_NewsList_Tpl` &orderBy=`createdon DESC` &dateFormat=`%d.%m.%Y` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &id=`(yams_id)` &language=`(yams_mname)` &paginate=`1`!]
                      <p class="pages">[+(yams_id)_previous+] [+(yams_id)_pages+] [+(yams_id)_next+]</p>

                      Plug-in execution order:
                      OnParseDocument
                      * YAMS
                      * PHx
                      OnWebPageComplete
                      * YAMS
                      OnWebPageInit
                      * YAMS
                      OnWebPagePrerender
                      * YAMS
                      * QM+

                      When I disable PHx plugin - pagination appears. I tried cacheable and uncacheable call and it didn’t work *(
                        Using: MODx Evo 1.0.6 / Revo 2.2.5