Jump to:

10843 Posts in 2514 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Events Details not displaying correctly on Event Calendar

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1875 Views
  • krouse
    Avatar
    Community Member
    10 Posts

    Re: Events Details not displaying correctly on Event Calendar Link to this post

    OK Calendar.ss is

    <% require css(event_calendar/css/calendar.css) %>
    <% require javascript(event_calendar/javascript/calendar_core.js) %>

    <!-- Primary Content added to fit BHG framework-->
    <div id="primaryContent" class="clearfix">
    <div class="innerpad">

    <div id="calendar-sidebar">
             <h3><% _t('BROWSECALENDAR','Browse the Calendar') %></h3>

       <div id="monthNav">
          <p><% _t('USECALENDAR','Use the calendar below to navigate dates') %></p>
          $CalendarWidget
          $CalendarFilterForm
       </div>
    </div>
    <div id="calendar-main">
        <div id="topHeading" class="clearfix">
          <span class="feed"><a href="$RSSLink"><% _t('SUBSCRIBE','Subscribe to the Calendar') %></a></span>
       <h2>$Title</h2>
       $Content
       </div>
    <div id="dateHeader">
          <% if DateHeader %>
             <h3>$DateHeader</h3>
          <% end_if %>
       </div>

    <% if Events %>
       <div id="events">
          <% control Events %>
             <div class="vevent clearfix">
                <div class="dates">$_Dates</div>
                <div class="details">
                   <h3 class="summary"><% if Announcement %>$EventTitle<% else %><a href="$Link">$EventTitle</a><% end_if %></h3>
                   <dl>
                   <% if AllDay %>
                      <dt><% _t('ALLDAY','All Day') %></dt>
                   <% else %>
                      <% if StartTime %>
                      <dt><% _t('TIME','Time') %>:&nbsp;</dt>
                            <dd>$_Times</dd>
                      <% end_if %>
                   <% end_if %>
                   </dl>
                      <div class="description">
                            <% if Announcement %>
                               $Content
                            <% else %>
                               <% control Event %>$Content.LimitWordCount(60)<% end_control %> <a href="$Link"><% _t('MORE','more...') %></a>
                            <% end_if %>
                            <% if OtherDates %>
                            <h4><% _t('SEEALSO','See also') %>:</h4>
                            <ul>
                            <% control OtherDates %>
                                <li><a href="$Link" title="$Event.Title">$_Dates</a>
                                  <% if StartTime %>
                                     <ul>
                                        <li>$_Times</li>
                                     </ul>
                                  <% end_if %>
                               </li>
                            <% end_control %>
                            </ul>
                            <% end_if %>
                      </div>
                </div>
                <ul class="utility">
                   <li><a class="btn add" href="$ICSLink"><% _t('ADD','Add to Calendar') %></a></li>
                </ul>
             </div>
          <% end_control %>
       </div>
    <% else %>
    <% _t('NOEVENTS','There are no events') %>.
    <% end_if %>
    </div>
    </div>
    </div>

    and CalendarEvent.ss is

    <% require css(event_calendar/css/calendar.css) %>
    <% require javascript(event_calendar/javascript/calendar_core.js) %>

    <div id="primaryContent" class="clearfix">
    <div class="innerpad">
          <div id="calendar-sidebar">
             <h3><% _t('BROWSECALENDAR','Browse the Calendar') %></h3>
             <div id="monthNav">
                <p><% _t('USECALENDAR','Use the calendar below to navigate dates') %></p>
                $CalendarWidget
                <h4><% _t('FILTERCALENDAR','Fitler calendar') %>:</h4>
                $CalendarFilterForm
             </div>
          </div>
          <div id="calendar-main">
             <div id="topHeading" class="clearfix">
                <span class="back"><a href="$CalendarBackLink"><% _t('BACKTO','Back to') %> $Parent.Title</a></span>
                <span class="feed"><a href="$RSSLink"><% _t('SUBSCRIBE','Subscribe to the Calendar') %></a></span>
                <h2>$Parent.Title</h2>
             </div>
             
             <% if Menu(2) %>
             <% include SideBar %>
             <div id="Content">
             <% end_if %>
                      
             <% if Level(2) %>
                <% include BreadCrumbs %>
             <% end_if %>
             <div class="vevent">
                <% if OtherDates %>
                <div id="additionalDates">
                   <h4><% _t('ADDITIONALDATES','Additional Dates') %></h4>
                   <dl class="date clearfix">
                   <% control OtherDates %>
                      <dt><a href="$Link" title="$Event.Title">$_Dates</a></dt>
                         
                   <% end_control %>
                   </dl>
                </div>
                <% end_if %>
                <h3 class="summary">$Title</h3>
                
                <% control CurrentDate %>
                <h4><a href="$ICSLink" title="Add to Calendar">$_Dates</a></h4>
                
                <% if StartTime %>
                <ul id="times">
                   <li>$_Times</li>   
                </ul>
                <% end_if %>      
                <% end_control %>
                
                $Content
                $Form
                $PageComments
             </div>
                <% if Menu(2) %>
                </div>   
                <% end_if %>
          </div>
       </div>
    </div>

  • UncleCheese
    Avatar
    4085 Posts

    Re: Events Details not displaying correctly on Event Calendar Link to this post

    So remove this:

    <% if Menu(2) %>
    <% include SideBar %>
    <div id="Content">
    <% end_if %>

    and this

    <% if Menu(2) %>
    </div>
    <% end_if %>

    from CalendarEvent.ss. Make sure you're working in your mysite directory so you're not altering the core files of the event_calendar module.

  • krouse
    Avatar
    Community Member
    10 Posts

    Re: Events Details not displaying correctly on Event Calendar Link to this post

    I don't have those files in the mysite directory only in the event_calendar directory.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Events Details not displaying correctly on Event Calendar Link to this post

    They should be. The templates that are included with modules are just examples. Everyone's site is different, so any templates you want to override, you should copy over to your mysite directory.

    So create mysite/templtaes/Layout/CalendarEvent.ss and copy over the contents of the event_calendar/templates/Layout/CalendarEvent.ss. Run a ?flush=1, then, make your changes to the mysite CalendarEvent template. That way, when new versions of the module come out, you can safely update the code without having to worry about it overwriting any changes you've made to the core. It's a basic override system used by many CMS frameworks.

  • krouse
    Avatar
    Community Member
    10 Posts

    Re: Events Details not displaying correctly on Event Calendar Link to this post

    Well that fixed the problem in firefox but it's still not displaying correctly in IE. The Upcoming Events are not are not displaying correctly on the Calendar page in IE either. It looks great in firefox but not IE. Any ideas?

  • krouse
    Avatar
    Community Member
    10 Posts
  • UncleCheese
    Avatar
    4085 Posts

    Re: Events Details not displaying correctly on Event Calendar Link to this post

    Getting pages to look right in IE is the bane of every web developer's existence. Unfortunately, this isn't really a forum for CSS and XHTML support. You can probably post your link to HTMLForums or WebMasterWorld and get some good tips. I can take a look if you have a link, as well.

    A lot of times, you just have to make an IE specific stylesheet and put it in conditional comments to target the browser.

  • krouse
    Avatar
    Community Member
    10 Posts
    1875 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.