haven't done an integration into a uSkinned theme myself.
The package works with some DocumentTypes that are used to render the calendar and the detail pages. I'm using Route Hijacking with Controllers to fetch all data and display it on the page. So you would be easiest to use the DocumentTypes that come with the package. The view itself can be adjusted.
Sadly I can't see the bold lines as the code you pasted in is wrongly formatted.
Can you only add the two lines again?
Ok so the first line is about the sources of one or more calendar.
The sources are a url with different parameter which are created in the default controller for the DocumentType and then returned.
The second line is about how the view of the calendar should be shown. If a single calendar is shown it is the selected view of this calendar. If all calendar should be shown then it defaults to 'month'.
You can get the sources in your custom code by:
var queryDispatcher = EventCalendarServiceContainer.GetService<IQueryDispatcher>();
var result = queryDispatcher.Dispatch<GetCalendarSourcesQuery, GetCalendarSourcesQueryResult>(
new GetCalendarSourcesQuery { CalendarId = selectedCalendar, Culture = model.CurrentCulture.ToString() });
The selectedCalendar is the id of a calendar or 0 for all calendar.
sorry forgot the second. Basically with the sources you can select the correct view like this: string view = result.Sources.Count == 1 ? ((dynamic)result.Sources.First()).view : "month";
It looks like Gurmail and I are having the same issue trying to integrate this into our sites.
If you could put up a detailed step by step on how to implement a calendar as a partial view from scratch would be greatly appreciated as I am also lost as to what you are suggesting.
I can try. It depends a bit on how you want to render the partial. Just use Html.Partial() or are you using a SurfaceController by calling Html.Action().
Basically you need to get an id of a calendar. You can add the calendar picker which is provided to your document type on which you want to show a calendar, using static 0 for getting all calendar or getting a calendar id by using the api.
Then you also need to include the necessary css/js files for fullcalendar in your view of course. And should be all to render the calendar in a partial.
when I click on the event to get the detail popup I get the following error screen.
Server Error in '/' Application.
Illegal characters in path.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Illegal characters in path.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Integrating Event Calendar into uSkin skin layout
I have installed v3.4.1 and are trying to evaluate it before I purchace.
From what I have seen it looks good.
By the way I are running it on umbraco 7.6.5 and it runs as I expected it to.
But I need it to be integrated into a uSkinned layout.
I have you got any documentation as to how to do this.
I believe I will need to custom write a Partial view that will site under the advanced or standard component folders in the skin.
I have modified the case statements in the Advanced page cshtml for the skin.
I have created a new doc type for the skin
I have copied the EECalendar and created a partial view but are getting stuck on the 2 Bold Lines.
@inherits Umbraco.Web.Mvc.UmbracoViewPage
Hi Daniel,
haven't done an integration into a uSkinned theme myself.
The package works with some DocumentTypes that are used to render the calendar and the detail pages. I'm using Route Hijacking with Controllers to fetch all data and display it on the page. So you would be easiest to use the DocumentTypes that come with the package. The view itself can be adjusted.
Sadly I can't see the bold lines as the code you pasted in is wrongly formatted. Can you only add the two lines again?
Regards David
It seems that all the code I posted didnt go up.
line 1
var sources = @Html.Raw(Json.Encode(Model.Sources)); which I have changed to var sources = @Model.Calendar;
line 2
defaultView: '@Model.View',
Ok so the first line is about the sources of one or more calendar. The sources are a url with different parameter which are created in the default controller for the DocumentType and then returned.
The second line is about how the view of the calendar should be shown. If a single calendar is shown it is the selected view of this calendar. If all calendar should be shown then it defaults to 'month'.
You can get the sources in your custom code by:
The selectedCalendar is the id of a calendar or 0 for all calendar.
Cool so that sorted the first.
How do I get the second.
Hi Daniel,
sorry forgot the second. Basically with the sources you can select the correct view like this:
string view = result.Sources.Count == 1 ? ((dynamic)result.Sources.First()).view : "month";
Regards David
Hi David
It looks like Gurmail and I are having the same issue trying to integrate this into our sites.
If you could put up a detailed step by step on how to implement a calendar as a partial view from scratch would be greatly appreciated as I am also lost as to what you are suggesting.
Hi Daniel,
I can try. It depends a bit on how you want to render the partial. Just use Html.Partial() or are you using a SurfaceController by calling Html.Action().
Basically you need to get an id of a calendar. You can add the calendar picker which is provided to your document type on which you want to show a calendar, using static 0 for getting all calendar or getting a calendar id by using the api.
The rendering and fetching of the sources looks like in this gist: https://gist.github.com/Mantus667/a05a70e7606934982a4fb415584d8d5a
Then you also need to include the necessary css/js files for fullcalendar in your view of course. And should be all to render the calendar in a partial.
Hope that helps.
Regards David
This worked with a few additional changes.
use https://gist.github.com/Mantus667/a05a70e7606934982a4fb415584d8d5a
add to the beginning @inherits UmbracoViewPage<"name of the document type"> add after line 6 @using System.Globalization;
replace line 14-17 with
@{
add at the end }
add to patrial views/advanced components/USN_Advancedpagecomponents.cshtml into the switch case
I now need to get the next part working.
when I click on the event to get the detail popup I get the following error screen.
Server Error in '/' Application. Illegal characters in path. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Illegal characters in path.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Illegal characters in path.] System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) +11794484 System.IO.Path.GetExtension(String path) +21 Umbraco.Core.UriExtensions.IsClientSideRequest(Uri url) +19 Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +64 Umbraco.Web.UmbracoModule.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
is working on a reply...