Pages

Tuesday, October 15, 2013

migx inside migx in Modx Revo

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.

2 comments:

  1. Hey! This is really old so I'm hoping you will reply haha...

    This 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...

    ReplyDelete
  2. I must say really great effort.

    This 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!

    ReplyDelete