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

    I’m using evolution 1.0.2 with YAMS 1.1.7 alpha RC8.

    Some pages are filled by ditto, and each ditto element contains a link to a page with a form. This link is generated by
    <a href=[~docid~]?m=[+id+]>...</a>
    in the ditto template.

    These links seem not to be recognized by the YAMS plugin, so that they lead to a non-existent page (because they are relative links: domain.de/folder1/folder2/folder1/folder2/doc.htm)

    I’m using friendly URLs with friendly paths, so these two folders are duplicated by error.

    What can I do?

    Thanks in advance
    Martin
      • 9994
      • 133 Posts
      I’m just guessing, maybe [~docid~] has to be something like (yams_id:docId) im not sure.

      http://svn.modxcms.com/docs/display/ADDON/YAMS+Placeholders

      Or this is somekind of bug:
      http://modxcms.com/forums/index.php/topic,43846.msg261433.html#msg261433
        Best CMS eva!
        • 10313
        • 375 Posts
        If I only use [~docid~] without the additional GET-parameter, it works very good. The problem ist the trailing "?m=x", I think this is the reason why YAMS does not recognize the URL and it won’t be parsed.
          • 22851
          • 805 Posts
          @FuryDE.

          YAMS will automatically converts quoted strings like [tt]"[~something~]"[/tt] or [tt]"[(base_url)][~something~]"[/tt] to [tt]"(yams_doc:something)"[/tt] or [tt]"(yams_docr:something)"[/tt] depending on your YAMS settings. This is then evaluated to produce the multilingual URL. You are correct that the query string prevents before the final quote prevents YAMS from recognising this as a standard URL and so YAMS does not do the automatic conversion in this case. However there should be nothing to stop you doing the conversion manually. Try using [tt]<a href="(yams_doc:docid)?m=[+id+]">...</a>[/tt] instead.
            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.