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.

Two weblogs, one calendar

July 02, 2007 7:09pm

Subscribe [3]
  • #1 / Jul 02, 2007 7:09pm

    seven24

    11 posts

    I currently have one calendar being populated by one weblog. Until recently, the use of the calendar was solely for upcoming events.  I would now like to add entries from another weblog to also populate the calendar.  Any idea how this can be accomplished easily?  I’ve included the code of the current calendar index page.

    <h1>Event Calendar</h1>
    
    <!-- calendar -->
    
    {exp:repeet:get_ids weblog="event" parse="inward" calendar="yes"}
    {exp:repeet:calendar switch="calendarToday|calendarCell" weblog="event" entry_id="{repeet:entry_ids}" interval_field="event_repeat" include_field="event_include_dates" exclude_field="event_exclude_dates" show_future_entries="yes" show_expired="yes" dynamic="off"}
    
    <table class="calendarBG" border="0" cellpadding="0" cellspacing="0" summary="Event Calendar" width="100%">
    <tr class="calendarHeader">
    <th colspan="5"><h2>{date format="%F %Y"}</h2><p></th><br />
    <th><div class="calendarMonthLinks"><a href="http://{previous_path=calendar}" title="{previous_date format=">« {previous_date format="%F %Y"}</a></div></th><br />
    <th><div class="calendarMonthLinks"><a href="http://{next_path=calendar}%22class=%22calendarMonthLinks" title="{next_date format=" class="calendarMonthLinks">{next_date format="%F %Y"} »</a></div></th><br />
    </tr><br />
    <tr class="calendarDayHeading"><br />
    {calendar_heading}<br />
    <td>{lang:weekday_long}</td><br />
    {/calendar_heading}<br />
    </tr></p>
    
    <p>{calendar_rows}<br />
    {row_start}<tr class="calendarRows">{/row_start}</p>
    
    <p>{if entries}<br />
    <td><br />
    <div class='{switch}'><a href="http://{day_path=calendar/day}">{day_number}</a></div><br />
    {entries}<br />
    <div class="calendarEvent"><span class="calendarSpacer">  </span><a href="http://{title_permalink=calendar/info}">{title}</a></div><br />
    {/entries}<br />
    </td><br />
    {/if}</p>
    
    <p>{if not_entries}<br />
    <td><div class='{switch}'>{day_number}</div></td><br />
    {/if}</p>
    
    <p>{if blank}<br />
    <td class='calendarBlank'> </td><br />
    {/if}</p>
    
    <p>{row_end}</tr>{/row_end}<br />
    {/calendar_rows}<br />
    </table><br />
    {/exp:repeet:calendar}<br />
    {/exp:repeet:get_ids}</p>
    
    <p><!-- /calendar -->

  • #2 / Jul 02, 2007 10:00pm

    DSite

    18 posts

    If this were just a regular calendar, you should be able to use a parameter like weblog=“weblog1|weblog2” in your {exp:weblog:calendar} tag.  I don’t, however, remember if that parameter works with the RepEEt plugin.  It’s worth trying, though.

  • #3 / Jul 02, 2007 10:23pm

    seven24

    11 posts

    I initially tried to use

    weblog="event|message"
    in both instances, but the following error is displayed

    Number of weblogs and repeat fields do not match.

    . I wonder if I have to play with the event_include_dates and other fields?

  • #4 / Jul 03, 2007 1:00am

    DSite

    18 posts

    Hmmm…  Sounds like a question for Mr. Wilson, the author of the plugin.  Try going through the RepEEt docs again, and if you don’t find an answer there, shoot him a PM or an email.

  • #5 / Jul 30, 2007 4:06pm

    Mr. Wilson

    131 posts

    I just now saw this thread. Talk about crummy turn-around time…

    Anyway, you can find the answer under “Parameters” here. For example:

    If you are creating a calendar from two or more weblogs (i.e. you have specified weblog=“events|holidays”) then you must list an equal number of fields in this parameter (i.e. interval_field=“events_interval|holidays_interval”).

    The parameters for interval_field, include_field, and exclude_field must all contain the same number of (pipe-separated) items as your weblog parameter.

    Does that make sense?

  • #6 / Jul 31, 2007 12:19am

    seven24

    11 posts

    It does make sense. Thanks!  Now that that’s figured out, I have one final challenge.  Am I able to have the entries that appear from one weblog link to one template, and the others to another?

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

ExpressionEngine News!

#eecms, #events, #releases