We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33238
    • 388 Posts
    undecided I will try to explain this CORRECTLY:

    i.m uploading a .CSV file using a Template Variable,
    name: [*CSVexcelFile*]
    Input Type: File (the client going to upload the file here)

    ok, and i.m using a Snipped to show that CSV file like a html table... http://modxcms.com/extras/package/?package=595 IS EXCELLENT...

    SO... i need to call the file name ONLY in this line:

    [[csv2html? &csv=`RIGHT HERE` &limit=`999` &tplOuter=`csv_out_template`]] How can i to call the file dynamically? that means that no matters the name that the client use in the file, it always going to be showed!

    i try a lot of ways.. &csv=`[*CSVexcelFile*]` / &csv=`[+CSVexcelFile+]` and another diffetrents, but NOTHING!!! :’(

    Can some one help me please!!!
    THANK YOU SO MUCH!!!
      --
      ysanmiguel.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      What exactly does your CSVexcelFile TV return all by itself? Just put its TV tags in a content somewhere and see what it is doing. It probably isn’t returning the file and path information your snippet requires.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 33238
        • 388 Posts
        this is just a csv (coma delimited) file, to create a table.

        i jus need to call the file name not content or something more, because the content is callet by the snipped.

        and i.m using the tv because i thing that is the simple way for a client to upload a file.

        if i upload the csv in another way, the problem is that i don.t know how to call it dynamically!
          --
          ysanmiguel.com
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Your snippet needs a valid filename and path to load the .csv file. Your TV is using the Resource Browser to upload and/or select the desired file. My question was, what is the TV actually producing? If I remember correctly, a file type TV with no output widget will produce a relative path to a file:
          assets/files/myfiles/myfile.pdf
          Is this what your TV produces? Is this what your snippet needs to work with?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 33238
            • 388 Posts
            if i use the call [*CSVexcelFile*] in some place...

            it is showing to me the file path: assets/files/member-list.csv like text.

            that is that i need, but why is not working wen i put it inside the call??

            [[csv2html? &csv=`[*CSVexcelFile*]` &limit=`999` &tplOuter=`csv_out_template`]]

            but if i put the pat manually, it works perfectly...

            [[csv2html? &csv=`assets/files/member-list.csv` &limit=`999` &tplOuter=`csv_out_template`]]

            some ideas???
              --
              ysanmiguel.com
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Hm. It certainly sounds as if it should. Let me dig into it a bit and see what results I come up with.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 33238
                • 388 Posts
                do you need something from me?
                  --
                  ysanmiguel.com
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  No, I’m getting an error when using the TV in a cached snippet
                  [[csv2html? &csv=`[*CSVexcelFile*]`]]

                  Error with parameter &csv=`assets/files/testing.csv`: CSV data not readable!
                  but, as you said, manually entering the exact same parameter works fine.

                  It does work with the TV in an uncached snippet.
                  [!csv2html? &csv=`[*CSVexcelFile*]`!]

                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 33238
                    • 388 Posts
                    i will try!! wink
                      --
                      ysanmiguel.com
                      • 33238
                      • 388 Posts
                      grin grin grin grin grin grin grin

                      WOW You are AWESOME!!! wink

                      thank you so much!!!

                      but, can you explain to me a little bit what was wrong please??

                      again!!! THAN YOU SO MUCH!!!!! laugh
                        --
                        ysanmiguel.com