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

    I want to use a Resource List in my MigX panel, but when it shows in the template, it displays the resource id. If I use the link tag ([[~id]]) instead of the usual TV tag, it doesn’t display at all. I tried setting the output of the Resource List to URL, but that created an anchor tag, too, which I didn’t want. How can I output the URL correctly?

    Thanks,
    Lee

      • 4172
      • 5,888 Posts
      this is the correct syntax for creating Urls from resource-ids in placeholders:

      [[~[[+yourField]]]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 20197
        • 9 Posts
        Hi Bruno17,

        thank you very much for your addon.
        I’m using it to manage images with a chunk. But I’m using subdomains as context variables and there is a bug inside your addon.
        When I have an imagetv, I cant browse correctly in my subdomain filemanager_path. The reason is that the wctx variable isn’t send to the image element connector correctly.

        You can find the patch attached.

        CU

        Thomas
          • 20197
          • 9 Posts
          Hi again,

          I have a question about this article http://rtfm.modx.com/display/ADDON/MIGX.Fancybox-images+with+seperate+placeholders+in+Richtext-Content.
          Inside the frontend I’m using the following code:
          [[!getImageList? &tvname=`Images` &tpl=`yaml_imagebox` &toSeparatePlaceholders=`MYIMG`]]


          In this case, the placeholders [[+MYIMG.0]], [[+MYIMG.1]]... are used inside the backend (TinyMCE).

          In order to get a better overview about the placeholders, I would like to insert into the first column the placeholder name itself:
          [
          {"header": "Variable", "width": "10", "sortable": "true", "dataIndex": "itemid", "dataValue":"[[+MYIMG.{idx}]]"}, 
          {"header": "Desc.", "width": "10", "sortable": "true", "dataIndex": "description","renderer":"this.renderLimited"}, 
          {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"}, 
          {"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer":"this.renderImage"},
          {"header": "Pos.", "width": "10", "sortable": "true", "dataIndex": "position"}
          ]
          

          E.g. Inside the Variable column, in every row the Placeholder [[+MYIMG.idx]] (idx is dynamic) is written.

          Is this possible?

          Thank you for your help.

          CU

          Thomas
            • 4172
            • 5,888 Posts
            that doesn’t create a number dynamically (perhaps a custom-tv could be created which can do it)
            but you can add a field where you add a manual number and you can use this field in the placeholder with:

            &placeholdersKeyField=`number`


            now the number in the placeholder will be the value of your ’number’-field

            [[+MYIMG.1]],[[+MYIMG.2]],[[+MYIMG.3]]



            .....and thanks for your patch. I will add it to the next version of MIGX.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 1331
              • 129 Posts
              Is anyone else having trouble using MIGX with Image TVs in 2.1.2 and 2.1.3? Actually I can’t get it to render a preview for anything. and Image TVs no longer recognizes a context’s filemanager_path or filemanager_url. They default to the main context’s filemanager_path no matter what I do.
                • 4172
                • 5,888 Posts
                Quote from: abelafonte at Jul 25, 2011, 06:35 PM

                Is anyone else having trouble using MIGX with Image TVs in 2.1.2 and 2.1.3? Actually I can’t get it to render a preview for anything. and Image TVs no longer recognizes a context’s filemanager_path or filemanager_url. They default to the main context’s filemanager_path no matter what I do.

                doesn’t this patch help to solve that issue?
                http://modxcms.com/forums/index.php/topic,63702.msg377100.html#msg377100
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 1331
                  • 129 Posts
                  Quote from: Bruno17 at Jul 25, 2011, 11:34 PM

                  Quote from: abelafonte at Jul 25, 2011, 06:35 PM

                  Is anyone else having trouble using MIGX with Image TVs in 2.1.2 and 2.1.3? Actually I can’t get it to render a preview for anything. and Image TVs no longer recognizes a context’s filemanager_path or filemanager_url. They default to the main context’s filemanager_path no matter what I do.

                  doesn’t this patch help to solve that issue?
                  http://modxcms.com/forums/index.php/topic,63702.msg377100.html#msg377100

                  Thanks for the link to the patch. It’s just a diff export, so I’m not sure what I can do with it. But I just made unique image TVs for each of my contexts in the meantime. It’s messy, but it’ll do until there’s an update.
                    • 20197
                    • 9 Posts
                    Quote from: Bruno17 at Jul 25, 2011, 12:05 AM

                    that doesn’t create a number dynamically (perhaps a custom-tv could be created which can do it)
                    but you can add a field where you add a manual number and you can use this field in the placeholder with:

                    &placeholdersKeyField=`number`


                    now the number in the placeholder will be the value of your ’number’-field

                    [[+MYIMG.1]],[[+MYIMG.2]],[[+MYIMG.3]]



                    .....and thanks for your patch. I will add it to the next version of MIGX.


                    Hi Bruno17,

                    thank you for your help. Please don’t be shocked ;-) but I have a new patch for the getImageList snippet.
                    The aim is to write the variable to the grids in order to get a better overview about all variables that are used and to make it easier for non html/programming guys to insert an image.
                    The result you can see in the attached screenshot.

                    At first my configuration of Formula Tabs and Grids:
                    [
                    {
                    	"caption":"Add Image",
                    	"fields": [
                    			{"field":"variable","caption":"Variable No.","inputTV":"Images_tv-variable"},
                    			{"field":"description","caption":"Desc.","inputTV":"Images_tv-description"},
                    			{"field":"title","caption":"Title","inputTV":"Images_tv-title"},
                    			{"field":"image","caption":"Image","inputTV":"Images_tv-image","renderer": "this.renderImage"},
                    			{"field":"position","caption":"Position","inputTV":"Images_tv-position"},
                    			{"field":"width","caption":"Width","inputTV":"Images_tv-width"},
                    			{"field":"height","caption":"Height","inputTV":"Images_tv-height"}
                    	]
                    }
                    ]
                    

                    [
                    	{"header": "No.", "width": "10", "sortable": "true", "dataIndex": "variable"}, 
                    	{"header": "Desc.", "width": "10", "sortable": "true", "dataIndex": "description"}, 
                    	{"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"}, 
                    	{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer":"this.renderImage"},
                    	{"header": "Pos.", "width": "10", "sortable": "true", "dataIndex": "position"}
                    ]
                    


                    The TV Images_tv-variable has the following configuration (maybe its not perfect):
                    Listbox with input option
                    @EVAL return '[[+MYIMG.'. $_REQUEST['itemid'] .']]';


                    The template has the following snipped configuration:
                    [[!getImageList? &tvname=`Images` &tpl=`yaml_imagebox` &toSeparatePlaceholders=`MYIMG` &docid=`[[*id]]` &placeholdersKeyField=`variable`]]


                    Changed:
                    - Insert a new variable $placeholdersKeyFieldSeparator. [[+MYIMG:0]] is now possible
                    - Replace the $toSeparatePlaceholders inside $fields[$placeholdersKeyField] to get only a number. E.g. [[+MYIMG.0]] to 0

                    I think this is the easiest way to get an better overview for non programming users.

                    CU

                    Thomas





                      • 30107
                      • 44 Posts
                      Hi Bruno,

                      what an absolutely great addition to MODX this is! I fell in love with MIGX.

                      I just finished my work on a project which is heavily based on MIGX. The editor builds up a page step by step by setting the datasets. The sum of all datasets result in the final page. It’s based on the idea of different content elements, like the ones used in TYPO3. Each dataset can contain one (configurable) image and/or some text portion. It’s a very flexible approach, and it works great. With this approach, the editor has not to set images in Tinymce, he just separates the text of the page to different datasets and adds the image to the dataset, next to the corresponding text.

                      In order to make it more comfortable to the editor: is it possible to "style" the MIGX table in the backend in a way so it better reflects the design of the website? If the editor uses h1, h2 or a table tag, the styles of the MODX backend are shown in the MIGX backend... it’s a little bit confusing then.

                      Another topic - some minor glitch: If the editor opens the ressource in the backend and just sorts the datasets, the "save"-button of the ressource can’t be pressed. The editor has to edit some other TV first.

                      Just to make it clear, here are my MIGX settings:
                      [
                      {"caption":"Text", "fields": [
                      	{"field":"textabsatz","caption":"Textabsatz","inputTV":"tvMigxRichText"}
                      ]},
                      {"caption":"Bild", "fields":[
                      	{"field":"bildauswahl","caption":"Bildauswahl","inputTV":"tvMigxBildauswahl"},
                      	{"field":"bildzeile","caption":"Bildunterschrift","inputTV":"tvMigxRichtext"},
                      	{"field":"bildausrichtung","caption":"Bildausrichtung","inputTV":"tvMigxBildausrichtung"},
                      	{"field":"bilddownload","caption":"Bilddownload","inputTV":"tvMigxBilddownload"},
                      	{"field":"lupe","caption":"Bildlupe","inputTV":"tvMigxLupe"}
                      ]},
                      {"caption":"PDF", "fields": [
                      	{"field":"pdfauswahl","caption":"PDF-Datei","inputTV":"tvMigxDateiauswahlPdf"},
                      	{"field":"pdflinktext","caption":"Linktext"},
                      	{"field":"pdfbeschreibung","caption":"Beschreibung","inputTV":"tvMigxTextarea"}
                      ]},
                      {"caption":"Quellcode", "fields": [
                      	{"field":"quellcode","caption":"Quellcode-Eingabe"}
                      ]}
                      ]


                      [
                      {"header": "Text", "width": "160", "sortable": "true", "dataIndex": "textabsatz"},
                      {"header": "Bild", "width": "50", "sortable": "false", "dataIndex": "bildauswahl","renderer": "this.renderImage"},
                      {"header": "PDF", "width": "20", "sortable": "true", "dataIndex": "pdflinktext"},
                      {"header": "Quellcode", "width": "20", "sortable": "true", "dataIndex": "quellcode"}
                      ]

                      This discussion is closed to further replies. Keep calm and carry on.