We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12113
    • 5 Posts
    I want to format how the list view of mxcalendar is displayed (for example, I only want the title to show up as a link for the full event - without all of the details of the event showing). Can I specify what template to use to display the events? And if so, what’s the parameter I use for that when calling mxcalendar. And when creating the template chunk...what placeholders can I use?

    • Yep, you certainly can. There are two methods to handle this so the decision really rest on how much customization you need to do? By that I mean is it just this single display that you need to alter or will you be altering more. If the answer is just the one display then a simple parameter for a chunk override will do the trick, then for the later you’d be better off creating a new theme to manage that.

      To use a simple chunk override on the display for list display there are two two parameters for chunk overrides. First the "mxcTplEventListWrap" which is the outer most wrapper of all the returned events which by default is [located in the /assets/modules/mxCalendar/themes/default/views/event.list.container.html file]:
      <div id="[+mxcEventListContainerId+]" class="[+mxcEventListContainerClass+]">
      
          <h2>[+mxcEventListContainerTitle+]</h2>
      
          [+mxcEventList+]
      
          <p><a href="[+mxcEventListMoreURL+]" class="[+mxcEventListMoreClass+]">[+mxcEventListMoreLabel+]</a></p>
      
          [+mxcCategoryFilters+]
      
      </div>
      


      this list uses all the possible placeholder values for that view.

      Then we have the "mxcTplEventListItemWrap" parameter which controls the individual events returned
      [located in the /assets/modules/mxCalendar/themes/default/views/event.list.event.html file]
          <div  id="[+mxcEventListItemId+]" class="[+mxcEventListItemClass+]">
      
              <div class="date">
      
                  <div class="month"><p>[+mxcEventListItemMonth+]<span>[+mxcEventListItemYear+]</span></p></div>
      
                  <p style="[+mxcEventListItemMultiDayStyle+]">[+mxcEventListItemStartDateTime+][+mxcEventListItemDateTimeSeperator+][+mxcEventListItemEndDateTime+]</p>
      
              </div>
      
              <h6 style="font-size: 100%;">[+mxcEventListItemTitle+]</h6>
      
              <p>[+mxcEventListItemStateDateStamp+] - [+mxcEventListItemEndDateStamp+]</p>
      
      	<p>[+mxcEventListItemDescription+]</p>
      
          </div>
      


      again this one uses most of the possible placeholders, but does not include the placeholder for the event description.

      That was the long explaination and it woulds like all you want is the following:
      [!mxcalendar? &mxcType=`list` &mxcTplEventListItemWrap=`chunkNameHere`!]
      


      then in your chunk all you need is the following:
      [+mxcEventListItemTitle+]
      


      Thus with just those two parameters and two chunk files you could create a simple result structure like an unordered list. Let me know if that helps or if you’d like any further examples.

      Cheers
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.