We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42049 ☆ A M B ☆
    • 250 Posts
    Having a little issue and thought I would make a proper thread instead of a massive twitter conversation!

    I have website a, and I have website b, both on an installtion of MODX.

    On Website B, I am doing a get resources call to resources that are under Website A.

    When these are rendered to the screen on Website B, i want to make a direct link, to the resource on Website A.

    By doing a

    [[~[[+id]]]]


    It returns www.websiteb.com/resource, instead I would like www.websitea.com/resource

    I have tried the following, with no success

    [[~[[+id]]? &scheme=`full`]]


    And even the api method.

    <?php
    
    $id = ID OF RESOURCE
    #context = KEY OF CONTEXT
    $url = $modx->makeUrl($id, $context, '', 'full');
    
    return $url;


    Thanks in advance!
      GEL STUDIOS
      MODX Professional | MODX Ambassador

      Website | Email | Twitter | Facebook
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Please share your context settings for both contexts involved; likely a misconfiguration there.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 42049 ☆ A M B ☆
        • 250 Posts
        Here you go..

        web (website a)

        none.

        modx (website b)

        base_url = /
        site_url = http://www.websiteb.com

        Would I be correct in assuming then that I need to replicate the values that I put in for the new context in the old one? (With its unique values of course) I just presumed it got them from the main settings page.
          GEL STUDIOS
          MODX Professional | MODX Ambassador

          Website | Email | Twitter | Facebook
          • 38290
          • 712 Posts
          Site_url should be http://www.websiteb.com/

          Quote from: gelstudios at Jan 20, 2013, 11:25 AM
          Here you go..

          web (website a)

          none.

          modx (website b)

          base_url = /
          site_url = http://www.websiteb.com

          Would I be correct in assuming then that I need to replicate the values that I put in for the new context in the old one? (With its unique values of course) I just presumed it got them from the main settings page.
            jpdevries
            • 38290
            • 712 Posts
            I'm not sure how many of these are necessary but you may want to add any of these that are applicable:

            • site_start
            • http_host
            • site_status
            • site_name
            • error_page
            • unauthorized_page
              jpdevries
              • 42049 ☆ A M B ☆
              • 250 Posts
              Yeah ive got all them in, just didnt list them as didnt think they were applicable.

              As default, these arnt set up on the default web context. Do i have to put these in the web context if I am using multiple contexts in this way?
                GEL STUDIOS
                MODX Professional | MODX Ambassador

                Website | Email | Twitter | Facebook
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                If a context does not have custom context settings, then the system settings will be applied. For example, the default system setting for site_start is resource #1. But if you have a multi-language site, for example, you would most likely want to set this for each context.
                  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
                  • 42049 ☆ A M B ☆
                  • 250 Posts
                  Brilliant, thanks for all the replies - all sorted now!
                    GEL STUDIOS
                    MODX Professional | MODX Ambassador

                    Website | Email | Twitter | Facebook