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

    I'm trying to filter events by category in list view without success. Looking at the documentation it seems that this might not be an available option. The call I am using is this:

    [[!mxcalendar? 
    &displayType=`list`
    &isLocked=`true`
    &tplListItem=`myTplListItem`
    &tplListHeading=`myTplListHeading`
    &tplListWrap=`myTplListWrap`
    &dir=`ASC`
    &calendarFilter=`2`]]


    ...which still displays all categories. Does anyone have any clues as to if or how I can do this?

    Many thanks - Zaphodx

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

    • discuss.answer
      • 34084 ☆ A M B ☆
      • 756 Posts
      To filter in the parameters by category use the &categoryFilter parameter.

      Example if category id was 2 for Book Reading that I wanted to list. This filter works on the list and calendar views.

      [[!mxcalendar?&categoryFilter=`2`]]


      Cheers
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.
        • 33379
        • 110 Posts
        Thanks Charles, that's much appreciated. I must have got mixed up with which call to make for this, doh smiley

        Cheers - Zaphodx
          • 42239
          • 73 Posts
          Quote from: charless at Mar 27, 2013, 10:04 PM
          To filter in the parameters by category use the &categoryFilter parameter.

          Example if category id was 2 for Book Reading that I wanted to list. This filter works on the list and calendar views.

          [[!mxcalendar?&categoryFilter=`2`]]


          Cheers

          charless I don't see this call in the documentation and it doesn't seem to be working for me. I have 9 categories and need to filter out two of them on one specific calendar. Here is my snippet call:

          [[!mxcalendar?
          &displayType=`calendar`
          &elEndDate=`+30weeks`
          &calendarFilter=`1`
          &categoryFilter=`1,2,3,4,5,6,7`
          &tplMonth=`TWOTMonth`
          &tplDetail=`TWOTDetail`
          &tplCategoryWrap=`TWOTCategoryWrap`
          &tplCategoryItem=`TWOTCategoryItem`
          ]]

          Everything else works great just the category call does not.
            • 34084 ☆ A M B ☆
            • 756 Posts
            Have you tried to remove the calendar filter, it all depends on how the events are enterd based on the snippet what is filtered out. If you can provide a detail edit screen shot of an event you want to render I should be able to validate and provide more information possibly.

            Cheers
              Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
              Visit CharlesMx.com for latest news and status updates.
              • 42239
              • 73 Posts
              Quote from: charless at Apr 19, 2013, 09:46 PM
              Have you tried to remove the calendar filter

              I tried removing the calendar filter and still did not remove the categories.
              Maybe this will help get across what I'm trying to accomplish. I have a public and private side setup where the private side would have access to two more categories. I have 3 calendars total and on two of those calendars I would have two additional event categories that the public side would not get access too.
                • 35756
                • 166 Posts
                Hi there!

                I tried to filter categories by using the following addition to the snippet call:

                &categoryFilter=`3,9`


                That doesn't work, it outputs "No events found".


                When I only choose one category like this

                &categoryFilter=`3`


                or this

                &categoryFilter=`9`


                it works fine.


                Seems like the comma-separation causes the error.

                Is there a fix available for this?
                  • 36582
                  • 463 Posts
                  Just wondered if there was any fix for this - using comma-separation causes failure: no events?
                    Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk