Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

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

Event Calendar - Upcoming Events Control


Reply

17 Posts   2906 Views

Avatar
churika

8 June 2010 at 11:46am (Last edited: 8 June 2010 11:49am), Community Member, 29 Posts

               <ul style="margin: 0; padding: 0; width: 525px;">
                  <% control UpcomingEvents(4, events) %>
                      <li style="overflow: hidden; margin-bottom: 10px; height: 100px;">
                         <div class="eventleft" style="float: left; width: 150px;">
                            <a href="$Link">$ImageURL.SetWidth(125)</a>
                         </div>                        
                         <div class="eventright">
                            <a href="$Link">$Title</a><br />
                           <p>$_DatesText</p>
                            <p>$Content.LimitWordCount(15)</p>
                         </div>                            
                      </li>
                  <% end_control %>
               </ul>

$_DatesText is $_Dates function just renamed
$ImageURL is a data object I added

Avatar
UncleCheese

8 June 2010 at 11:51am 4085 Posts

If you're site isn't in dev mode. the URL debugging tools don't work, FYI..

Avatar
churika

8 June 2010 at 11:55am Community Member, 29 Posts

Director::set_dev_servers(array(
   'localhost',
   '127.0.0.1',
));

That is turned on in _config.php

Do i need to do something further to be in dev mode?

Avatar
UncleCheese

8 June 2010 at 12:21pm 4085 Posts

Director::set_environment_type('dev');

Avatar
UncleCheese

8 June 2010 at 12:25pm 4085 Posts

I don't think $Content is a valid field for a CalendarDateTime object. Make sure you're using the $Event accessor.

$Event.Content, or use the shortcut $EventContent which has some smarts in it to get the content from the related event or the Description field if it's an announcement.

Avatar
churika

8 June 2010 at 2:08pm (Last edited: 8 June 2010 2:08pm), Community Member, 29 Posts

Thx, using the Events. worked on both ImageURL and Content

and the dev thing worked too i was able to see which one wasn't able to be accessed

you're the man

Avatar
Spiggley

9 July 2010 at 5:32am Community Member, 12 Posts

I've just started using event Calendar and am impressed. If I am using $Event.Content within UpcomingEvents events, how can I use a word limit on this? as say $EventContent.LimitWordCount(10) doesn't work.

Also, (and apologies if this has been asked before) - what is the best way to override calendar css? - as putting in my theme is not working.

Sorry for the noob questions - with thanks

Avatar
UncleCheese

9 July 2010 at 5:55am 4085 Posts

<% control Event %>
$Content.LimitWordCount(10)
<% end_control %>