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

    i have a multi-language site with the blog (english only)
    i'm trying to use fastfield to show blog articles within other context (language).
    i successfully did similar thing with my contact page (ID = 5) to show it in other page within other context - where i use this in content area:
    [[#5.content]]
    


    would it be possible to do similar to show articles instead of content. E.g. my blog (articles) is ID = 6
    i tried so far (without a luck):
    [[#6.content]]
    

    [[#6.articles]]
    

    [[#6.content.articles]]
    

    [[#6.template.articles]]
    

    does anybody know or have an idea if & how this could work?

    thank you in advance
    kr
      MODX Revolution 2.2.8-pl (advanced)

      Extras:
      archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

      PHP Version 5.6.20-0
      MySQL Version 5.5.31
      • 3749
      • 24,544 Posts
      What do you get with this?

      [[#6.content]]


      You could always do it with a custom snippet, or try this:

      http://modx.com/extras/package/getresourcefield

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 44920
        • 48 Posts
        Quote from: BobRay at Feb 05, 2014, 11:54 PM
        What do you get with this?

        [[#6.content]]



        Hi, Bob

        i get nothing, empty content. similarly with other attempts mentioned above
        for blog i use Articles 1.7.1

        kr
          MODX Revolution 2.2.8-pl (advanced)

          Extras:
          archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

          PHP Version 5.6.20-0
          MySQL Version 5.5.31
          • 3749
          • 24,544 Posts
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 44920
            • 48 Posts
            Quote from: BobRay at Feb 06, 2014, 09:30 PM
            Did you try this: http://modx.com/extras/package/getresourcefield ?

            Hi Bob,

            [[getResourceField? id=`6` &field=`content`]]

            gives me the same result as
            [[#6.content]]

            which means empty content


            kr.
              MODX Revolution 2.2.8-pl (advanced)

              Extras:
              archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

              PHP Version 5.6.20-0
              MySQL Version 5.5.31
              • 4172
              • 5,888 Posts
              what is the content of Resource nr. 6?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 44920
                • 48 Posts
                Quote from: Bruno17 at Feb 07, 2014, 10:40 AM
                what is the content of Resource nr. 6?

                Hi Bruno

                Resource nr. 6 is Articles Container

                btw. i realized i forgot to add &tpl attribute to getResources and i actually mixed it with getResourceField. so i can try to built template and attempt to get articles via getResources. however i wonder if it would be possible easier way via fastField. maybe i'm just not correctly targeting the stuff - i mean maybe it is necessary to use something else instead of '.content'

                kr.

                  MODX Revolution 2.2.8-pl (advanced)

                  Extras:
                  archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

                  PHP Version 5.6.20-0
                  MySQL Version 5.5.31
                  • 3749
                  • 24,544 Posts
                  You could just take the tag that's on the Articles container page and put it where you want to show the listing (you might have to adjust the &parents property value).

                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                  • fastField isn't really appropriate because it can't parse the content section of an Articles container (I would guess) since Articles uses getResources to build the article index. Getting the unparsed value of a regular content field is probably fine. I would go with the getResources to grab content and display it for this scenario.
                      • 3749
                      • 24,544 Posts
                      If you really need the whole page, you could do it with cURL. There's also PHP's file_get_contents('url_of_resource').

                      Somewhere, there's a utility by OpenGeek for getting a processed resource, but I can't find it.

                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting