We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16583
    • 15 Posts
    Quote from: Andy at Mar 09, 2007, 04:19 AM

    So you have the images "assets/images/en.gif" and "assets/images/zh.gif"? They must be in those locations.
    If you view your page source in your browser, does anything appear where you placed the Languages snippet?

    At a minimum you should see a <a href=...</a>. If not then the Languages snippet is either incorrect or not being called or the languages template variable uses an incorrect format. It should be something like "zh=5" for an english page.

    Andy

    Hi all,
    I’ve followed the Multi-Lingual Site wiki and the snippet show me the flags in the home-page.
    So I sayd "Yeaah!!"

    But the snippet only work in the home page.  huh

    From the home the flags refer to the en( id 49 ) and it( id 48 ) Welcome page.
    These are showed without the flags

    How debug if the snippet has been called? or where it fails? ( some logs ? )

    Edit: I don’t know what, but using IE7 the ids 48, 49 result in a 404 page( also if logged, but can access these pages, with snippet doesn’t working, from FF3.0.2 also if not logged ).  shocked ...maybe this is another problem!

    Edit2:
    // get languages info
    $tv = $modx->getTemplateVar('languages', "", $modx->documentIdentifier);
    $languages = $tv['value'];
    
    // ###### DEBUG
    
    $output2 = "Snippet eseguito ".$languages;
    return $output2;
    
    
    if (!strlen($languages))
    {
      return "";
    } 
    just return "Snippet eseguito".

    Thank you
      • 16583
      • 15 Posts
      The document was not published, sorry.
      But still served to Firefox.
        • 33372
        • 1,611 Posts
        Quote from: LAj at Oct 02, 2008, 10:46 AM

        The document was not published, sorry.
        But still served to Firefox.
        If you are logged into the Manager in a browser (e.g., Firefox) you can view unpublished pages in that same browser.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You can allow/disallow viewing unpublished documents in a role.
            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
            • 16583
            • 15 Posts
            Thank you.
            Quote from: ZAP at Oct 02, 2008, 11:27 AM


            If you are logged into the Manager in a browser (e.g., Firefox) you can view unpublished pages in that same browser.

            Yeah, but TVs doesn’t work >:(
            laugh
              • 25663 MODX Staff
              • 12,272 Posts
              LAj, this would actually make for a great bug report to open in JIRA: http://svn.modxcms.com/jira (TVs not rendering when previewing by an Admin from the Manager).
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 17476
                • 2 Posts
                Hi guys,

                I have been following all the instructions from the wiki however I got stuck in an issue...

                I am creating a new document on which I want to set a value for ’languages’ TV that is different from the default one. However values go back to default after saving the document.

                Hence it works on my home page because ’languages’ TV uses default setting, however it doesn’t on any other page : It redirects me to my homepage in the right language sad

                I wouldn’t qualify myself as very comfortable with cms and coding, I hope the answer is not too obvious smiley

                Thanks in advance for your help
                  • 17476
                  • 2 Posts
                  I have done some more investigations...

                  Actually I cannot set any TV value in the documents I edit. Everytime I do so (I have tried on other TVs as well) then save the document it leaves the TV field with its default value...

                  Anybody has an idea??

                  For instance do you guys know the name of the table that links the document with the TV values associated to it?

                  Any suggestion would be very appreciated
                    • 33372
                    • 1,611 Posts
                    The table is called modx_site_tmplvar_contentvalues (assuming your table prefix is modx_), and you can add and edit values in there manually if necessary. What version of MODx are you using? This bug should be fixed in the latest version of MODx as far as I know.
                      "Things are not what they appear to be; nor are they otherwise." - Buddha

                      "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                      • 13352
                      • 26 Posts
                      Hi All,

                      Sorry to post this. I really need your help ....
                      I’m new to Modx, just tried in these somedays. Many people said that Modx is great, but we must learn it first, need time ... sad .... I used Joomla for some years, simple but can’t do all what I need ...
                      I try to make a multi language site, multi level user access (ACL, frontend, backend) with Modx, but failed ... sad ...
                      Could some one help me with these pleaseeeeeeeee ?

                      1) Where can I find the example (demo) page using multi language described here, using Modx ?
                      2) I have done these (using Modx-0.9.6):
                      a) Download icons ’famfamfam_flag_icons.zip’ , unpack it, put ’de.png’ & ’en.png’
                      to .../assets/images/
                      b) Login to backend, create snippets ’Redirect’ :
                      Resources -> Manage Resources -> Snippets -> New Snippets
                      Snippets name : Redirect
                      Insert the code :
                      <?php
                      $url = $modx->makeUrl($id);
                      .....
                      ?>
                      Only admin (id=1) can edit this
                      Save it.

                      c) Login to backend, create snippets ’Languages’ :
                      Resources -> Manage Resources -> Snippets -> New Snippets
                      Snippets name : Languages
                      Insert the code :
                      <?php
                      $tv = $modx->getTemplateVar(’languages’, ....
                      .....
                      ?>
                      Only admin (id=1) can edit this
                      Save it.

                      d) Login to backend, create TV ’languages’ :
                      Resources -> Manage Resources -> Template Variable -> New Template Variable
                      Var name : languages
                      Type : text

                      Tick at the templates that may use this TV (all of standard template : modxhost, modxcss & modxcss wide).
                      Access permission : All group (public)
                      Save it.

                      e) Edit template :
                      Resources -> Manage Resources -> Templates -> Modxhost
                      At html code :
                      Just after .... [(site_name)]</h1>
                      Try to call the TV, I add this:
                      [*language*] => is this wrong ?
                      Save it.

                      The icons is not appear at frontend .... why ??

                      3) Is there a complete tutorial (step by step for beginner) ?? ... smiley

                      4) Another basic question: I just create a content (as backend user). How can I add that content to appear in frontend (in menu) ? Is it via wayfinder ? Call it like this from template (html) file : [!Wayfinder? &startId=`0`!]
                      Is that right ?

                      5) I have create some frontend users (with its own role, own level). I can login at frontend with this frontend user, but don’t know how to begin create a content ....
                      How to make a link at frontend to call the FCKeditor (as my default editor) to begin create a content ?

                      Any information will very helpful. Many thanks.
                      Best Regards,
                      - Jack -