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.

calendar module: list upcoming events

June 29, 2007 10:46am

Subscribe [3]
  • #1 / Jun 29, 2007 10:46am

    stevo_s

    176 posts

    Hi, I’m using the small sidebar calendar module and taking off the left and right arrows for previous and future months and I’m trying to get a scenario similar to here where upcoming events are just on a sidebar list, and maybe previous events are too BUT I’d like to have it that they only list upcoming events if there are any in that month - so I guess an ‘if’ statement is needed?  Anyone done something similar or know what might work?

  • #2 / Jun 29, 2007 11:36am

    ruraldreams

    279 posts

    you’ll use the weblog entries tag, php to get the current date and the start_on and stop_before parameters
    http://expressionengine.com/docs/modules/weblog/parameters.html#par_start_on

  • #3 / Jun 29, 2007 11:49am

    stevo_s

    176 posts

    <?php
    global $LOC;
    $current_time = $LOC->decode_date('%Y-%m-%d %g:%i %A', $LOC->now);
    ?>
    
    {exp:weblog:entries weblog="{my_weblog}" limit="5" sort="asc" show_future_entries="yes" start_on="<?php echo $current_time; ?>"}

    thanks I’ll give that a go.

  • #4 / Jun 29, 2007 1:02pm

    stevo_s

    176 posts

    Hi - that works for the sidelinks but when I click on the link it gives me a blank page - what would I need to put in my template to show future and present entries - or would I need a new template with new weblog entries parameters?


    Presently I have a fullstory template with this:

    {exp:weblog:entries weblog="events" dynamic="off"}
    <h2>{title}</h2>
    <p><span class="newsdate">{entry_date format="%F %d %Y"}</span><br />
    {news_full_story}<br />
    {/exp:weblog:entries}

  • #5 / Jun 29, 2007 1:06pm

    stevo_s

    176 posts

    s’ok was missing show_future_entries=“yes”
    D’oh

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

ExpressionEngine News!

#eecms, #events, #releases