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

    my site : http://www.espacelyonjapon.com

    I found a way to make the breadcrumb snippet work with yams. I can now list the breadcrumbs with the multilangual menutitle TV by adding a piece of code into a copy of the breadcrumb snippet.

    But I still have a problem :

    The url links generated by the breadcrumb snippet always point to the French language.
    For example (with lang_id = ja) : I get http://www.espacelyonjapon.com/cours.html instead of http://www.espacelyonjapon.com/ja/cours.html

    With ditto, or wayfinder, I don’t have this problem, probably thanks to yams’ extender, but I just can’t reproduce it with breadcrumb ...

    Can you give me a clue ?

    Many thanks in advance

    Eric

      • 8537
      • 26 Posts
      It seems that the answer is quite similar as the http://modxcms.com/forums/index.php/topic,48221.0.html "How to retrieve mulitlangual documentIdentifier (yams_doc) in a snippet?" topic ..


      Am I right ? can I get the same anwser ?

      tkx

      Eric
        • 22851
        • 805 Posts
        PaulSuckling Reply #3, 14 years ago
        Salut Eric.

        I distribute a YAMS-ified version of the Breadcrumbs snippet with YAMS - so you should already have a copy. There are online instructions for installing and using the YAMS Breadcrumbs snippet. I think that this should work for all YAMS >= 1.1.4 alpha.

        The YAMS-ified snippet I provide doesn’t resolve weblinks. If you want to do that then you’ll need to change [tt]ConstructURL[/tt] to [tt]ConstructResolvedURL[/tt] in the snippet code.

        がんばってー! Let me know how you get on.

        EDIT: By the way, I’m trying to keep my French language skills up to scratch and to learn Japanese, so I love your site. I’ll be passing through Lyon on the train on the way to holidays around Grenoble + Genève in August. It’s a shame I wont have time to actually stop and visit your school!
          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.
          • 8537
          • 26 Posts
          Yes, you’re right ! ありがとう ございます。☆☆☆

          I’m now in version 1.1.9 and it works perfectly ! so I get rid of my poor piece of code and use yours that is terrific !

          I don’t have any problems left with breadcrumbs.

          I will now try to implement rss feed using one of the threads I’ve seen.
          The last thing will be to manage keywords, i still couldn’t find a thread about that.

          Eric.

          Bye the way : We are just 10 min away from the Lyon Station ! smiley
            • 22851
            • 805 Posts
            Quote from: efilippi at May 25, 2010, 01:35 PM

            I will now try to implement rss feed using one of the threads I’ve seen.
            You mean either my or ddim’s solution in this thread. I should probably transfer that over onto the Confluence documentation.

            Quote from: efilippi at May 25, 2010, 01:35 PM

            The last thing will be to manage keywords, i still couldn’t find a thread about that.
            I’m sure there has been at least one thread on the issue, but it’s probably quicker to tell you how rather than to find it!

            1. Create one template variable for each language and associate them with your templates: keywords_fr, keywords_ja in your case. The YAMS ManagerManager rules will automatically tabify them for you.
            2. Within your [tt]<head>[/tt] block, include the following line:
            <meta lang="(yams_tag)" name="keywords" content="[[YAMS? &get=`data` &from=`keywords` &docid=`[*id*]`]]" />

            3. (Optional) Add the following after the yams require line in your mm_rules chunk to make use of the ManagerManager keyword tag widget:
            $langIds = $yams->GetActiveLangIds();
            foreach ( $langIds as $langId )
            {
              mm_widget_tags('keywords_' . $langId );
            }

            This will maintain one database of keywords for each language, but you can alter the above to generate a single [tt]mm_widget_tags[/tt] call with a comma separated list if you want to use a single database of keywords across all languages.

            Quote from: efilippi at May 25, 2010, 01:35 PM

            Bye the way : We are just 10 min away from the Lyon Station ! smiley
            Unfortunately I think my train passes straight through Lyon without stopping, but if my ticket does allow me to take a break at Lyon I’ll definitely pop in with my fiancée to say hello!
              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.
              • 8537
              • 26 Posts
              cool, I’ll try that. Just let me a couple of days ...


              many thanks !
                • 8537
                • 26 Posts
                Hello !

                I’m getting beter and better in Yams comprehension !

                - Breadcrumbs works perfectly !
                - RSS feeds works perfectly
                - Keywords using multilingual TVS works but there are somme troubles :

                1. Create one template variable for each language and associate them with your templates: keywords_fr, keywords_ja in your case. The YAMS ManagerManager rules will automatically tabify them for you.

                The YAMS ManagerManager does not tabify correctly :
                - keywords_ja sometimes does not appear at all
                - I added English language, then :
                - Title_en appears in all tabs below the content
                - keywords_fr appears on to of English tab

                note : I’ve applied steps 1 (create TVs), 2 (modify <head> block) and 3 (modify mm_rules chuck)

                // ------------------------ INSERT YOUR RULES HERE --------------------
                // These are example rules -- replace them with your own
                // PHP *is* allowed

                // News editors role -- creating a variable makes it easier to manage if this changes in the future
                $news_role = ’3’;

                mm_hideFields(’pagetitle,menutitle,link_attributes,template,menuindex,description,show_in_menu,which_editor,is_folder,is_richtext,log,searchable,cacheable,clear_cache’, $news_role);
                mm_renameTab(’settings’, ’Publication settings’, $news_role);
                mm_synch_fields(’pagetitle,menutitle,longtitle’, $news_role);
                mm_renameField(’longtitle’,’Headline’, $news_role, ’’, ’This will be displayed at the top of each page’);

                // News story template
                $news_tpl = ’10’;
                mm_createTab(’Categories’,’HrCats’, ’’, $news_tpl, ’’, ’600’);
                mm_moveFieldsToTab(’tvnewsbigimage’, ’general’, ’’, $news_tpl);
                mm_changeFieldHelp(’longtitle’, ’The story\’s headline’, ’’, $news_tpl);
                mm_changeFieldHelp(’introtext’, ’A short summary of the story’, ’’, $news_tpl);
                mm_hideFields(’menuindex,show_in_menu’, ’’, $news_tpl);
                mm_changeFieldHelp(’parent’, ’To move this story to a different folder: Click this icon to activate, then choose a new folder in the tree on the left.’, ’’, $news_tpl);


                // For everyone
                mm_default(’pub_date’);
                mm_renameField(’introtext’,’Summary’);
                mm_changeFieldHelp(’alias’, ’The URL that will be used to reach this story. Only numbers, letters and hyphens can be used’);
                mm_widget_tags(’blogTags’); // Give blog tag editing capabilities to the ’blogTags’ TV
                mm_widget_colors(’colour’, ’#666666’); // make a color selector widget for the ’colour’ TV
                //mm_widget_showimagetvs(); // Always give a preview of Image TVs
                mm_widget_showimagetvs(); // Always give a preview of Image TVs for ManagerManager

                // For everyone except administrators
                mm_hideFields(’link_attributes’, ’!1’);
                //mm_moveFieldsToTab(’tvcolour’, ’general’);

                // Added for YAMS
                require( $modx->config[’base_path’] . ’assets/modules/yams/yams.mm_rules.inc.php’ );
                $langIds = $yams->GetActiveLangIds();
                foreach ( $langIds as $langId )
                {
                mm_widget_tags(’keywords_’ . $langId );
                }

                // ------------------------ END OF RULES --------------------

                Have I done something wrong ?
                  • 8537
                  • 26 Posts
                  In fact, I think we can close this post on Breadcrumbs and have a new one on TVS ...