Hello, I am new to modx.
I am trying to make two blogs (as articles) in modx. I made two article documents. The problem is they both show the same content of the last made article document. How do I fix this?
For example:
- Articlescontainer_1
----apple
---- banana
-Articlescontainer_2
----pineapple
----mango
when I go to Articlescontainer1 I see: pineapple and mango.
When i go to Articlescontainer2 I see pineapple and mango too!!
I just want two seperated "articles"
attached a little screenshot
[ed. note: remcoo last edited this post 14 years ago.]
-
☆ A M B ☆
- 1,780 Posts
I'm not sure if this is the best solution, but it should work. Maybe someone smarter will know better.
You may have to use getResources to call articles rather than the articles placeholder (+articles) in the second container.
&parents should be set to the Id of the second Articles container.
[[getResources?
&parents=`14`
&tpl=`sample.ArticleRowTpl`
&showHidden=`1`
&limit=`8`
]]
I'm not sure if +paging will work properly with this, you might need to place a getPage call there instead as well.
If I understand your question right, your problem is that the Articles snippet which fills the +latest_posts placeholder currently can only retrieve resources from one single Articles container.
Therefore you have to create your own "latest_posts" snippet or use the getResources snippet to get a correct result.