We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Calendar day_path with non entry days

Development and Programming

ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

Apparently the day_path variable doesn’t work with days that don’t have entries. Is there a way to alter the module code so I can grab the Year and Month variable from whatever day is clicked on. I’m trying to set up a reservation calendar where if a day doesn’t have any reservations users can click on it and fill out a form that gets sent to the client, but I need to pass along the date that the user clicks.

Thanks

Here’s my code so far:

{exp:weblog:calendar switch="today|empty" weblog="reservations" show_future_entries="yes" show_expired="yes" status="not closed"}

<table class="calendarBG" border="0" cellpadding="6" cellspacing="1" summary="My Calendar">
<tr class="calendarHeader">
<th><div class="calendarMonthLinks"><a href="http://{previous_path=calendar/index}"><<</a></div></th>
<th colspan="5">{date format="%F %Y"}</th>
<th><div class="calendarMonthLinks"><a href="http://{next_path=calendar/index}class=calendarMonthLinks">>></a></div></th>
</tr>
<tr>
{calendar_heading}
<td class="calendarDayHeading">{lang:weekday_abrev}</td>
{/calendar_heading}
</tr>

{calendar_rows }
{row_start}<tr>{/row_start}

{if entries}
<td class='{switch}' align='center'>{day_number}</td>
{/if}

{if not_entries}
<td class='{switch}' align='center'><a href="http://{day_path=calendar/detail}">{day_number}</a></td>
{/if}

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

{row_end}</tr>{/row_end}
{/calendar_rows}
</table>
{/exp:weblog:calendar}
       
keighl's avatar
keighl
18 posts
16 years ago
keighl's avatar keighl

any luck in doing this … I’ve tried to find the appropriate code to alter in mod.weblog_calendar.php, but I can’t figure it out.

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

Not natively. What I ended up doing is pass the date elements through the segments.

{if not_entries}
<td class='{switch}' align='center'><a href="http://{path=calendar/reservations}{if">{day_number}</a></td>
{/if}
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.