Uploaded image for project: 'FAQ Application'
  1. FAQ Application
  2. FAQ-34

Allow {{faq}} macro to display entries from different FAQs

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 8.4
    • None
    • Unknown

    Description

      The FAQ Application allows for multiple FAQ spaces in the same wiki.
      Each of the respective homepages show only the FAQs from that space.

      However, the faq macro currently requires the space to be included in the filter parameter. In order to return any FAQs, the faq macro must be used as follows:

      {{faq filter="space=..."/}}

      Unfortunately, this restricts the ability to be able to call the faq macro and show all the FAQs from the entire wiki, across multiple spaces.

      I suggest that if the filter parameter is not set, then FAQs from all spaces of the wiki are included. Vincent's suggestion here would be sufficient.

      Vincent's suggestion:

      In FAQCode.FAQJSON, change

      #gridresultwithfilter($request.classname $request.collist.split(",") "" " and doc.fullName<>'FAQCode.FAQTemplate' and doc.space='$!request.space'")

      to

      #if ("$!request.space" != '')
        #set ($spaceCondition = " and doc.space='$!request.space'") 
      #end
      #gridresultwithfilter($request.classname $request.collist.split(",") "" " and doc.fullName<>'FAQCode.FAQTemplate'$!spaceCondition")

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbergman Malachi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: