We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3522
    • 2 Posts
    Hello,
    Im using MODx from one week and i find it very interesting and useful. I have few questions.
    At first sorry fot my english ... im doing all my best smiley

    So ..

    Question one:
    I want to create two different kinds of users. So i need two vesrions of WebSignup with different fields ?
    After dath i want my two types of users to "see" differet content .. by example type one see one page one wat .. type two another .. what is the right way to do this. Im thinking of something like:

    select type from user_atributes ...

    $type = $rw[’type’]

    if ($type == 0){
    }else{
    }

    Is there more "elegant" way ...?

    Qusetion two :

    What about the multilingual support? Is there a global $lang variable ? What about the template and i it correct to use two copyes of each table in the DB .. like fr_table and en_table ...

    I cound used some help smiley And source smiley)

    10xz in advance .
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That is what the Security -> Web Users and Security -> Web Permissions (in the MODx Manager) is for.

      With Web Permissions, you will need to create two Web User Groups in the Web User Groups tab, then create two corresponding Resource Groups in the Resource Groups tab, then connect each Web User Group to its corresponding Resource Group in the User/Resource Group Links tab.

      Next, when creating the documents that you want Web User Group #1 to view, assign it to Resource Group #1, and those documents that are for Web User Group #2 get assigned to Resource Group #2.

      Now, when a Web user is created, assign him to Web User Group #1 or Web User Group #2, and when he logs in he’ll be able to see those pages. Wayfinder will use the groups (checking the logged-in user’s SESSION values ) to show or not show the pages in the menu. Anyone not logged in to the proper group who tries to directly access the page will get sent to your "Unauthorized Page", which is determined by the Unauthorized page setting in Tools -> Configuration, the Site tab. You can create a special page just for this, perhaps with a login form, and put that document’s ID in the Unauthorized page field, or leave it at the default "1", which is your home page.

      There are a number of ways to deal with multilanguage support; http://wiki.modxcms.com/index.php/Make_Multi_Lingual_Site is a relatively simple way, and http://svn.modxcms.com/docs/display/ADDON/YAMS is a more complex complete solution.
        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
        • 3522
        • 2 Posts
        Wow!! That was a great responce smiley 10xz !

        I have few other questions but they are raleted to my last post so .. i’lll try the user groups etc .. and then ask more stupid questions smiley

        One more time - 10x