-
- 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:
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):
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
-
- 24,544 Posts
What do you get with this?
You could always do it with a custom snippet, or try this:
http://modx.com/extras/package/getresourcefield
-
- 48 Posts
Quote from: BobRay at Feb 05, 2014, 11:54 PMWhat do you get with this?
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
-
- 24,544 Posts
-
- 48 Posts
Quote from: BobRay at Feb 06, 2014, 09:30 PMDid you try this: http://modx.com/extras/package/getresourcefield ?
Hi Bob,
[[getResourceField? id=`6` &field=`content`]]
gives me the same result as
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
-
- 5,888 Posts
what is the content of Resource nr. 6?
-
- 48 Posts
Quote from: Bruno17 at Feb 07, 2014, 10:40 AMwhat 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
-
- 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).
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.
-
- 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.