Here i am showing code for migx within another migx in Modx Revolution
BackEnd :
first you have to written below code in "Form tabs" when you create migx TV in which you want to show another migx,
{"field":"institutions","caption":"Institutions","inputTV":"another_migx_name","renderer":"this.renderChunk"},
this will create another migx inside your original migx and store values in it.
FrontEnd :
now in frontend in main migx write simple migx code for fetch values from main migx.
[[!getImageList?
&tvname='migxTVname`
&tpl=`mainChunkName`
]]
in another migx for fetching values you can write like this code,
[[!getImageList?
&value=`[[+institutions]]`
&tpl=`Chunk_name`
]]
now it's done, and it will show your inside migx values.
If this helps you comment it and share it.
BackEnd :
first you have to written below code in "Form tabs" when you create migx TV in which you want to show another migx,
{"field":"institutions","caption":"Institutions","inputTV":"another_migx_name","renderer":"this.renderChunk"},
this will create another migx inside your original migx and store values in it.
FrontEnd :
now in frontend in main migx write simple migx code for fetch values from main migx.
[[!getImageList?
&tvname='migxTVname`
&tpl=`mainChunkName`
]]
in another migx for fetching values you can write like this code,
[[!getImageList?
&value=`[[+institutions]]`
&tpl=`Chunk_name`
]]
now it's done, and it will show your inside migx values.
If this helps you comment it and share it.
Hey! This is really old so I'm hoping you will reply haha...
ReplyDeleteThis all works fine for me but the migx inside the migx returns an array. What is the chunk supposed to look like? I just have:
img src="[[+slides]]"
That is the chunk for the migx inside the migx...
I must say really great effort.
ReplyDeleteThis Article is really cool. one of my friend suggested me to read your posts and i’m glad that i did. The work of an excellent CMS is to enable you to update your content with ease and all freedom. MODx at first instances seems difficult but the reality is that it is quite easy-to-use flawlessly. You can check out this article: https://goo.gl/aU5o8S if you’d like to know more about MODx. Thanks for sharing this information!