Squiz Calendar with multiple view type links


(Robert Stanley) #1

Hi,

 

Wanting to know if anyone has developed a Squiz Calendar where (dynamically using keyword replacements) both the next/prev "Day" and next/prev "Week" view links are both displayed at the same time, and which are clickable for showing a list of Events on the page in either the Day or Week view as well (depending on which link is clicked/selected)??
Also, would there be a way of generating a Day Name link selector (displaying the day names of the selected week [as per above] = Mon to Sun) using Squiz's local features/code/setup?

--

Kind regards,
Rob


(Anthony) #2

The links to navigate around the calendar just call the page URL with query string parameters like the ones below, so I'd think its easy to roll these into a button you create yourself rather than rely on what the asset displays itself...

 

?SQ_CALENDAR_VIEW=month&SQ_CALENDAR_DATE=2014-11-01

 

I have a page setup where I roll my own list of months and then use AJAX to dynamically load the view I want, but that view is generated by a calendar asset. As an aside I used a rolling calendar asset to generate the month list but you could do it any way thats convenient.


(Nic Hubbard) #3

I developed a new calendar using Matrix, I think it is doing some things that you wanted:

 

http://www.puc.edu/calendar


(Robert Stanley) #4

Thanks again everyone for all of your prompt replies, we really appreciate it!

 

We will definately be looking into all possible solutions to see if there’s anything we’ll be able to develop on our end.

 

Kind regards,

Rob


(Drew Nixon) #5

Hey Nic,

 

I'm trying to do something similar with my Events page which is currently nesting in a Calendars page and I want users to be able to switch months without the page being reloaded.

 

Just wondering if you could give some tips on how you achieved this?

 

Regards,

Drew


(Nic Hubbard) #6

I'm trying to do something similar with my Events page which is currently nesting in a Calendars page and I want users to be able to switch months without the page being reloaded.

 

Just wondering if you could give some tips on how you achieved this?

 

You need to use the %next_link% and %prev_link% keywords which you will use to get the URL from to load up the prev or next month using ajax.


(Drew Nixon) #7

Thanks for your reply Nic. Didn't realise there was already a Squiz Community post on this exact feature that makes it incredibly easy.

 

http://community.squiz.net/intermediate/basic-ajax-calendar-using-jquery


(Amurray) #8

This was a great fix - does anyone have the script from that http://community.squiz.net/intermediate/basic-ajax-calendar-using-jquerypage at all? That site is down that's all,


(Amurray) #9

OOh I found it from rollback:  

<script type="text/javascript">
//<![CDATA[

//Function for capturing the calendar navigation links and making them AJAX request links
function iniCalendar(){
//Find the calendar nav links and put click functions on them
$(".calendarNavLink").click(function(){
$(’#calendar-wrapper’).hide(); //Hide the calendar contents while we load the next page
$(’.loading’).html(’<em>Loading, please wait…</em>’).show(); //Show loading message
var requestUrl = $(this).attr(‘href’) + ’ #calendar-contents’; //Construct our AJAX request URL
$(’#calendar-wrapper’).load(requestUrl, function() {
//After the AJAX has loaded our next page, hide the loading message and show the calendar contents
$(’.loading’).html(’’).hide();
$(’#calendar-wrapper’).show();
iniCalendar(); //Initiate the calendar click functions again
});
return false;
});
}

//Initiate the calendar click functions after the calendar contents have loaded
iniCalendar();

//]]>
</script>