Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: SSI variables  (Read 529 times)
0 Members and 1 Guest are viewing this topic.
frankharrell
New Member
*

Karma: 0
Offline Offline

Posts: 0

Retired


WWW
« on: March 31, 2002, 09:30:00 AM »

Is there an SSI variable that would desplay the 'next X number of events' rather than the 'next X number of days'?

Thanks

Logged

Cowboy Frank
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #1 on: March 31, 2002, 05:56:00 PM »

Well, there is no variable to set for number of events, but you can call getEvents for a sufficiently long amount of time, then display only the number of events you want to.  If you are using the default ssi.html, make the following changes:

1) Find <%FOREACH EVENTLIST%> and place <%EVENTLOOP:%> on the line before it.

2) Find <%total_events++;%> and move it after <%FOREACH EVENT%>.

3) On the next line after the <%total_events++;%> that you just moved, place <%if (total_events == 5) { last EVENTLOOP; } %> replacing the 5 with the number of events you would like to show.

That should work, I think.  Let me know if you have any problems.

------------------
David Whittaker
http://www.uabcm.com/
http://www.csworkbench.com/

Logged

frankharrell
New Member
*

Karma: 0
Offline Offline

Posts: 0

Retired


WWW
« Reply #2 on: March 31, 2002, 09:22:00 PM »

Thanks. Will work on that when I get back from vacation.
Happy Trails.

------------------
Cowboy Frank

Logged

Cowboy Frank
snooty1972
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #3 on: September 29, 2004, 03:08:00 PM »

Could someone take a look at my template and let me know where I'm going wrong. I'm also trying to limit the number of events show e.g. to the first 5 but so far the below is not working.

Thanks

<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->

  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=5;
    %>
    <%EVENTLOOP:%>
    <%FOREACH EVENTLIST%>
       <%IF EVENTS EXIST%>
       <BR>
          <%FOREACH EVENT%>
             <%$total_events++;%>
             <%if (total_events == 5) { last EVENTLOOP; } %>
             <img src="http://www.regenthall.co.uk/regent/images/plus.gif" width=15 height=9 border=0>
             <A class=title HREF="<%=$CGI_URL_QUERYSTRING%>calendar=&template=&view=Event&event_id=<%=$EVENT->{'details'}->{'id'}%>"><%= $EVENT->{'details'}->{'title'} %></A><BR>
             <% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= $EVENT->{'schedule'}->{'start_time'} %><% } %>

             <% if ($EVENT->{'schedule'}->{'start_time'}) { %> : <% } %>
             <%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%><BR>
          <%/FOREACH%>
       <%/IF%>
    <%/FOREACH%>

    <%unless($total_events){%>
    <CENTER><I>No Events</I>
    <% } %>

Logged
Shelley
New Member
*

Karma: 0
Offline Offline

Posts: 13

Web Designer


« Reply #4 on: February 04, 2005, 05:29:00 PM »

Hi,

I would also like to limit the number of events listed as an include.

I tried modifying the ssi.html script as instructed above, but it does not work.

Ideally what I would like to do is have the events of the current week list display, dropping off the previous week events and not showing the next week events. This way, I could enter all the month's events at one go.

Has anyone been able to do something similar to this who could share a solution?

Many thanks in advance,

Shelley

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: February 05, 2005, 01:48:00 AM »

** I would like to have the events of the current week list display **

You can try changing the first line of the ssi.html template to:

&getEvents( { 'range'=>'week' } );

instead of

&getEvents( {'duration'=>$in{duration}} );

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: