Jump to:

10930 Posts in 2613 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Calendar event module - upcoming events on homepage?

Discuss all other Modules here.

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

Page: 1 2 3 4 5
Go to End
Author Topic: 5832 Views
  • nickysix
    Avatar
    Community Member
    4 Posts

    Re: Calendar event module - upcoming events on homepage? Link to this post

    I am having this same problem, how did you fix it?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar event module - upcoming events on homepage? Link to this post

    UpcomingEvents() and RecentEvents() are now decorated into your SiteTree, so you can call those functions on any template.

  • nickysix
    Avatar
    Community Member
    4 Posts

    Re: Calendar event module - upcoming events on homepage? Link to this post

    UpcomingEvents works fine, nothing is returned when I use RecentEvents. It's quite odd.

  • Kiwipearls
    Avatar
    Community Member
    34 Posts

    Re: Calendar event module - upcoming events on homepage? Link to this post

    I am having a hard time trying to get this to appear on my side bar.

    My homepage is formated differently from the rest of the site.

    my HomePage.php file looks like this:

    <?php
    /**
    * Defines the HomePage page type
    */

    class HomePage extends Page {
    static $db = array(
    );
    static $has_one = array(
    );
    }

    class HomePage_Controller extends Page_Controller {
    function UpcomingEvents()
    {
    return DataObject::get_one("Calendar")->upcomingEvents(5);
    }

    }

    and my HomePage.ss has this for the sidebar I created

    <div id="right">
           <div id="Sidebar" class="typography">$Page(notice-board).Content</div>
                 <% control UpcomingEvents %>
    <h3>$_Dates</h3>
    <h4><a href=$Event.Link">$Event.Title</a></h4>
    <% end_control %>
                       
       </div>

    I get this error on the page:

    This page contains the following errors:
    error on line 180 at column 12: AttValue: " or ' expected
    Below is a rendering of the page up to the first error.

    And it displays ugly data right up to the first date of the first event in the calendar:

    <span class="dtstart" title="20120330T000000-04:00">Mar. 30, 2012</span>
    <span class="dtend" title="20120331T000000-04:00"></span>

    The second line dtend data is not displayed on the page.

    I eagerly look forward to getting your help on this.

    my test site for now is http://demo.senilityguild.com

    5832 Views
Page: 1 2 3 4 5
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.