I'm working with SolSpace Calendar and I'm having trouble getting my styles to correctly display when paths are used in Calendar.
The calendar page is here: http://www.clubomgsf.com/calendar
For example: in the month view of the calendar, the "previous" and "next month" links look like this:
{path='calendar/month'}/{next_month format="%Y/%m"}/ which ends up looking like this: http://clubomgsf.com/calendar/2014/10/
It looks like additional subdirectories are being called, but they don't exist. I know this is some sort of templating question, but I've looked around in the doumentation and can't seem to find an explanation of how this works.
Question 1: How is Solspace Calendar using these "subdirectories" (e.g. calendar/2014/10/ ) to pass these variables through to the next page?
Question 2: Currently I am using a snippet to link to global CSS document. What is the best way to get this styling to pass through to pages being called by "subdirectories" as mentioned above?
I appreciate your help.
EDIT: My MONTH template:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
{exp:channel:entries channel="static_information"}
<title>{website_name}</title>
{site-includes}
{/exp:channel:entries}
</head>
<body>
<div id="background"></div>
<div id="masthead">
{exp:channel:entries channel="static_information"}
<a href="{site_url}mainsite"><img id="logo" src="{logo}" /></a><br />
<div id="contact-info">
{phone_number}<br />
{address}<br />
{e_mail}
</div>
<div id="sinker-left">
</div>
{/exp:channel:entries}
</div>
<div id="content-wrapper">
<div id="content">
{exp:channel:entries channel="static_information"}
<a href="{site_url}mainsite"><div class="mobile-logo"><img src="{logo}" /></div></a>
{/exp:channel:entries}
<div class="calendar-wrapper">
<div id="fc_calendar">
{exp:calendar:cal
{if segment_3 == ''}
date_range_start="year-month-01"
date_range_end="year-month-last"
{/if}
{if segment_3 != ""}
date_range_start="{segment_3}-{segment_4}-01"
date_range_end="{segment_3}-{segment_4}-last"
{/if}
}
{display_each_month}
<thead>
<div class="floatleft"><a href="{path='calendar/month'}/{prev_month format="%Y/%m"}/">{prev_month format="%F"}</a></div>
<div class="cal-header">{date format="%F %Y"}</div>
<div class="floatright"><a href="{path='calendar/month'}/{next_month format="%Y/%m"}/">{next_month format="%F"}</a></div>
</thead>
<table id="fc_outer">
<tbody>
<tr>
<td colspan="7">
<div class="wrap">
<table id="fc_inner">
<thead>
<tr id="days_of_week">
{display_each_day_of_week}
<th class="day_of_week {day_of_week}">
{day_of_week}
</th>
{/display_each_day_of_week}
</tr>
</thead>
<tbody>
{display_each_week}
<tr>
{display_each_day}
{if day_in_current_month}
<td class="day_cell">
<div class="date">
<a class="num"
href="{path='calendar/day'}/{date format="%Y/%m/%d"}/">
<div class="fp-cal">{date format="%j"}</div> <!-- Dates in current month -->
</a>
</div>
{if:else}
<td class="day_cell out_of_range">
<div class="date">
<span class="num">
<div class="fp-cal-nonmonth">{date format="%j"}</div> <!-- Dates in non-current months -->
</span>
</div>
{/if}
{display_each_hour}
{events}
<div
class="
event {if event_all_day}all_day{/if}
{if event_multi_day}multi_day{/if}
{if event_first_day}first_day{/if}
{if event_last_day}last_day{/if}
{if all_day_event_index_difference > 0}
index_difference_{all_day_event_index_difference}
{/if}
">
<div class="c-eventbutton" style="background-image:url('{event_image}')">
<div class="c-infospacer">
<div class="c-eventinfo">
{event_title}<br />
{event_start_date format="%g%a"} •
{if price}${price}{if:else}Free{/if}
</div>
</div>
</div>
</div>
{/events}
{/display_each_hour}
</td>
{/display_each_day}
</tr>
{/display_each_week}
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
{/display_each_month}
{/exp:calendar:cal}
</div>
SEGMENTS:<br />
1: {segment_1}<br />
2: {segment_2}<br />
3: {segment_3}<br />
4: {segment_4}<br />
5: {segment_5}<br /><br />
</div>
</div>
</div>
{embed="mainsite/sidebar-tpl"}
</body>
</html>
calendar/2014/10/
isn't a subdirectory: You might have a template group calledcalendar
and a template calledindex
, which gives/calendar
. The/2014/10
part is interpreted by thecalendar/index
template which, if well coded, pulls data for Oct. 2014.