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

    I am new to modx and migx. I have created a portfolio section in my landing page. And adding images using migx. Its great.

    Now I want to add a category list to migx. That i can select category for each item. If it does not exist I can create same using migx. I am not sure how to do it can any one guide or give me link of tutorial

    Thanks

    This question has been answered by Bruno17. See the first response.

    [ed. note: naumanahmed19 last edited this post 12 years, 5 months ago.]
      • 4172
      • 5,888 Posts
      Are you asking for a listbox, where you can select a category?

      you can do that with hard-coded inputOptionValues or use @EVAL or @CHUNK - binding to get the inputOptions.

      {"field":"category","caption":"Category","inputTV":"yourListboxTV"}


      or as inputTVtype

      {"field":"category","caption":"Category","inputTVtype":"listbox","inputOptionValues":"categoryA||categoryB||categoryC"}


      or with @CHUNK-binding

      {"field":"category","caption":"Category","inputTVtype":"listbox","inputOptionValues":"@CHUNK getInputOptions"}


      the content of chunk getInputOptions can be everything, which produces a doublepipe-delimited output of categories, even a snippet:

      [[getCategoriesAsInputOptions]]


        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 47625
        • 12 Posts
        Quote from: Bruno17 at May 12, 2014, 02:26 AM
        Are you asking for a listbox, where you can select a category?

        you can do that with hard-coded inputOptionValues or use @EVAL or @CHUNK - binding to get the inputOptions.

        {"field":"category","caption":"Category","inputTV":"yourListboxTV"}


        or as inputTVtype

        {"field":"category","caption":"Category","inputTVtype":"listbox","inputOptionValues":"categoryA||categoryB||categoryC"}


        or with @CHUNK-binding

        {"field":"category","caption":"Category","inputTVtype":"listbox","inputOptionValues":"@CHUNK getInputOptions"}


        the content of chunk getInputOptions can be everything, which produces a doublepipe-delimited output of categories, even a snippet:

        [[getCategoriesAsInputOptions]]





        Bruno Thanks for reply.

        I need @CHUNK-binding. I have another migx to create categories. But I am bit confused how to gets value in doublepipe in a chunk

        Right now Its gives me value at front end
        
        [[!getImageList?
            &tvname=`repeatable-portfolio-category-tv`
            &tpl=`@CODE:[[+cat]] ||
          `]]
        








        Kindly check screenshot I am not getting desire output. [ed. note: naumanahmed19 last edited this post 12 years, 5 months ago.]
        • discuss.answer
          • 4172
          • 5,888 Posts
          try this:

          [[getImageList?
              &tvname=`repeatable-portfolio-category-tv`
              &tpl=`@CODE:[[+cat]]`
              &docid=`theIDOfTheDocumentWhereYouHaveSetupTheCategoryTV`
              &outputSeparator=`||`
          ]]
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 47625
            • 12 Posts
            Great .. Thank you very much I wasted to much time on it.