ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

I need to filter my calendar entries

February 28, 2011 5:34pm

Subscribe [2]
  • #1 / Feb 28, 2011 5:34pm

    rbboyl

    38 posts

    I have a calendar set up in EE2 that is set to display all entries in every category under a specific channel (excpet category, I’ll paste code below).  I want to put a drop down box where the user can select a category and filter out the entries shown on the calendar.

    Anybody have any suggestions on how to do that?  Pass a variable through the url into the calendar tag category_id parameter?

    <!--calendar_details start-->
    {exp:channel:calendar channel="vip-experiences" switch="calendarToday|calendarCell" start_day="sunday" category_id="not 53" show_future_entries="yes" show_expired="no"}
        <div class="calendar_details">
          <h2><a href="http://{previous_path=calendar}"><<</a>  Events Calendar - {date format="%F %Y"}  <a href="http://{next_path=calendar}">>></a></h2>
    <p>{calendar_heading}<br />
          <div class="cols"><br />
            </p><h3>{lang:weekday_long}</h3>
    <p>      </div><br />
    {/calendar_heading}<br />
    {calendar_rows}      <br />
        <div class="rows"><br />
            <ul><br />
              <li><br />
                </p><h4>{day_number}</h4>
    <p>{if entries}<br />
        {entries}<br />
                <a href="http://{url_title_path=vip-experiences}">{title}</a><br />
        {/entries}<br />
    {/if}<br />
              </li><br />
            </ul><br />
          </div><br />
    {/calendar_rows}<br />
        </div><br />
    {/exp:channel:calendar}<br />
        <!--calendar_details end-->

  • #2 / Mar 01, 2011 9:15am

    Sue Crocker

    26054 posts

    Hi, rbboyl. There’s no built in method for using categories with the calendar. I know back several years ago there was a thread about using PHP to do this, but the links I found weren’t helpful. I can move this to the CodeShare Corner for you if you’d like so that others can assist..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases