We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42465
    • 33 Posts
    I'm having a little problem with this solution in that the only the first placeholders are being output. For example, if I'm looking to output

    Category 1
    question 1
    answer 1

    question 2
    answer 2

    Category 2
    question 3
    answer 3

    What I'm getting is

    Category 1
    question 1
    answer 1

    question 1
    answer 1

    Category 2
    question 1
    answer 1

    Additionally, it looks like if I have above a certain amount of categories and questions and answers the resource wont save.

    TV: FAQsCategory
    [{"caption":"FAQ Categories", "fields": [
        {"field":"category","caption":"Category"},
        {"field":"faqs","caption":"FAQs","inputTV":"FAQs"}
      ]
    }]


    [{
      "header": "Category", "sortable": "true", "dataIndex": "category"
    }]


    TV: FAQs
    [{"caption":"FAQ", "fields": [
        {"field":"question","caption":"Question"},
        {"field":"answer","caption":"Answer","inputTV":"richtextTV"}
      ]
    }]


    [
    {"header": "Question", "width": "160", "sortable": "true", "dataIndex": "question"},
    {"header": "Answer", "width": "160", "sortable": "true", "dataIndex": "answer"}
    ]


    Template: FAQTemplate
    [[getImageList? &tvname=`FAQsCategory` &tpl=`outerFAQsTpl`]]


    Chunk: outerFAQsTpl
    <h3>[[+category]]</h3>
    [[getImageList? &value=`[[+faqs]]` &tpl=`innerFAQsTpl`]]


    Chunk: innerFAQsTpl
      <p>[[+question]]</p>
      [[+answer]]


    If I substitute [[getImageList? &value=`[[+faqs]]` &tpl=`innerFAQsTpl`]] with [[+faqs]] I get

    [{"MIGX_id":"1","question":"q1","answer":"
    q1 answer
    "}] 


    It must be something very obvious. [ed. note: bob-rooney last edited this post 10 years ago.]
      • 4172
      • 5,888 Posts
      Do you have or had ever assigned the FAQs - TV to your template?
      If that is the case, make sure it is not and make sure there are no values left in the db for that TV.

      regarding the limit.
      If you have really a lot of them, I would suggest to put the Categories into a custom-table or use resources for them and change the outer-MIGX-TV to a MIGXdb - TV
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42465
        • 33 Posts
        I think you are onto something, Bruno. It looks like it's a DB problem of some sort. I don't have access to the DB so I've had to create a renamed duplicate of the FAQs TV and it seems to work fine. Thanks for that.

        Whith regards to the saving issue, I've got a better idea of the conditions under which it occurs. It looks like if I have created a new category with sub-items (questions and answers in my case) and I try to save then bam! it happens. (And just to clarify the issue is saving graphic on an infinite loop and no save.)

        If I create a category without sub-items then it saves OK. Attempting to subsequently add sub-items causes the saving issue.

        Duplicating an existing category, editing the category name and adding new sub-items saves successfully.

        I'm not familiar with MIGXdb but from a quick look it seems that the tab and column fields aren't supported. Can you outline in more detail how I would go about using this method?

        Thanks
          • 4172
          • 5,888 Posts
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 42465
            • 33 Posts
            Perfect stuff. Thanks.
              • 42465
              • 33 Posts
              FYI, my saving issues were browser related. I could not save using FF 29.0.1 Perhaps it's the browser itself or some add-ons. I haven't had time to test with disabled add-ons. Switching to Chrome did the trick.