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 Extravaganza !

June 22, 2007 4:47pm

Subscribe [2]
  • #1 / Jun 22, 2007 4:47pm

    mpace

    20 posts

    THe calendar I am creating is a long horizontal calendar where the days of the weak are all listed horizontaly (one row I guess you could say), instead of 4 rows, (1 for each week of the month)

    Issue 1

    In the calendar example in the documentation, for the “blank” days, the code is as follows..

    {if blank}
    <td class='calendarBlank'>{day_number}</td>
    {/if}

    The result (for me atleast, when copying and pasting the whole example calendar), are the “blank” days are filled with the number 1. I would like to actually

    have those days/cells filled up with the proper number, of the previous, and next month.

    Issue 2

    I would like the days of the week (S,M,T etc) to repeat horizontaly above days of the week, as the days of the week are listed all horizontaly

    Issue 3

    I have attempted to put leading_zeroes=“yes” within my “{exp:weblog:calendar}” but it does not seem to be working. I had figured it was a parameter for the

    calendar thing. I am not sure where else to put it. THe results are, well, no leading zeroes 😛

    Thanks in advance for any help offered.

    p.s. there is a link not working on the calendar documentation page.. “date variable formatting” link does not work. Sentence below!

    The current date. As with other date variables, this require the “format” parameter in order to define how the date should be displayed. See the date variable formatting page for more information.

  • #2 / Jun 24, 2007 9:52am

    Derek Jones

    7561 posts

    Can you post your entire calendar tag, please?  And are you using ExpressionEngine 1.6?  That parameter and ability for “blank” day numbering are only available in the new version.

  • #3 / Jun 25, 2007 10:12am

    mpace

    20 posts

    I am using 1.5.2.

    Here is the calendar code

    {exp:weblog:calendar switch="calendarToday|calendarCell" leading_zeroes="yes" show_future_entries="yes" weblog="you_events"}
    <table class="calendarBG" border="0" cellpadding="0" cellspacing="1">
    <tr>
    <th colspan="11" class="calendarHeader"><div class="calendarMonthLinks"><a href="http://{previous_path=events/}">«{previous_date format="%F %Y"}</a></div></th>
    <th colspan="11" class="calendarHeader">Events in the month of {date format="%F %Y"}</th>
    <th colspan="11" class="calendarHeader"><div class="calendarMonthLinks"><a href="http://{next_path=/events}class=calendarMonthLinks">{next_date format="%F %Y"}»</a></div></th>
    </tr>
    <tr>
    {calendar_heading}
    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
    {/calendar_heading}
    </tr>
    <tr>
    {calendar_rows}
    {if entries}<td class='{switch}' align='center'><a href="http://{day_path=events/}">{day_number}</a></td>{/if}
    {if not_entries}<td class='{switch}' align='center'>{day_number}</td>{/if}
    {if blank}<td class='calendarBlank'> </td>{/if}
    {/calendar_rows}
    </tr>
    </table>
    {/exp:weblog:calendar}
  • #4 / Jun 25, 2007 10:27am

    Derek Jones

    7561 posts

    I am using 1.5.2.

    Well, as I said, those features are new to 1.6, so they will not work in 1.5.2.

    As for #2, the calendar is designed to work in rows of weeks, so the {calendar_heading} tag pair only outputs one week’s worth of headings. You could use 5 sets of that tag pair so that it outputs the day headings for five weeks worth, e.g.:

    {calendar_heading}
    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
    {/calendar_heading}
    {calendar_heading}
    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
    {/calendar_heading}
    {calendar_heading}
    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
    {/calendar_heading}
    {calendar_heading}
    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
    {/calendar_heading}
    {calendar_heading}
    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
    {/calendar_heading}
  • #5 / Jun 25, 2007 10:30am

    mpace

    20 posts

    Ah I see, I will try that.

    Perhaps I will see if I can upgrade to 1.6.

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases