We make tools that make websites.

Forums (Archived)

The Solspace Support Forums are now CLOSED (read-only)

Check out our new support options here. Please refer to this blog post for more information.

   

Calendar / Structure & Event Output

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

I’m using Calendar in conjunction with Structure - Events treated as a list.  The process seems to be working very well.  I can create the calendar and add events without issue.

There are two niggling things I can’t resolve:

1) The forward / backward month toggles in the calendar header don’t function.

2) when clicking on an event in the calendar (month view), the process correctly forwards the user to the event result page. But, I can’t get the result output to display the event clicked.  No matter how I’ve tweaked the parameters, either a list of every event in the calendar gets displayed or the most recently entered single event gets displayed. 

Calendar may not play well with the way Structure builds URIs?  I ‘m guessing, but plan to pull Calendar out of Structure to test this theory.

Overall, the set up of this module and creating a basic calendar was cake ... the CSS was a bear to tweak, but I expected that.  Great work.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

I’ve tested these issues by pulling Calendar out of Structure and, for the most part, it does seem as though Calendar does not like the method Structure uses to create page URI’s. 

Test:
I’m using the “Moderate” difficulty Calendar Month code from the docs and for testing have purposely retained the exact page URI structure using {event_id}:

<a href="/calendar/events/{event_id}/">{event_title}</a

This has solved issue #2 noted above.
- I am now able to click on a calendar event and open the single event in a results page.

This has also partially solved issue #1 - the Forward and Backward Month toggle
1) it now functions
2) but, when toggling forward from April to May, the stylesheet breaks on May.  When toggling backward from April to March the stylesheet does NOT break but from March to February it breaks.  See images.

I’d love to get this working with Structure for two reasons.
• maintaing the navigation structure
• maintaining consistency for site administration for my client

Image Attachments Click thumbnail to see full-size image

april.pngmay.png
Avatar
RankRankRank

Total Posts: 107

Joined: Aug 19, 2005

PM

Ignore

 

Hi pburt,

We want Calendar to be as flexible as possible so I’m very interested in how it’ll fit in with Structure. Is there any chance you can set up a Super Admin account for me and PM me login details so I can snoop around and see what’s going on?

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Also, on the event results page, where are the Upcoming Occurrences supposed to link?  Clicking a link in this list takes the user to a 3 month view with a broken stylesheet.

Image Attachments Click thumbnail to see full-size image

occur.png
RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Absolutely.  I’ll send you a PM after I revert the pages back for use with Structure.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Alright, I’ve sent you access info for this project.

Couple notes:
After running the test, the issues definitely stem from
• the event_id variable and
• by using the precoded Moderate template, the month toggles are set to use the calendar/ template group. 

I can switch to a calendar template group if necessary - if I can get the event results working with Structure.  I’d prefer to retain the url structure created by the Structure Module. (if that makes sense)

I am wondering if using Advanced Month code would solve these issues?  Since, I would have access to the toggle code.  Can a url_title (in order to use { page_url }) be used in place of an event_id?

Avatar
RankRankRank

Total Posts: 107

Joined: Aug 19, 2005

PM

Ignore

 

Hi pburt16,

I have logged in and looked around. A couple notes:

1. I modified the event template to use event_name=”{segment_3}” instead of event_id=”{segment_4}”. Links to individual events work now.

2. If you want to keep using exp:calendar:month, then you’ll need to edit /themes/solspace_themes/calendar/templates/month.html. You’ll notice it’s basically just standard EE template code. Near the top are the previous/next month links. Just change /calendar/month/ to /structure/education-calendar/. Feel free to tweak other parts of the template as well (including the day links).

3. The alternative to #2 is to use something more like the “Advanced” code from the docs. I went ahead and put an example of the advanced code in your template; I also left the old code in there hidden behind EE comments. It’s your call whether you go this approach or #2.

The one thing I didn’t touch was the “day links”—where you go when you click on a day number. I’ll leave those up to you.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Superb!

I’ll play around a bit.

I greatly appreciate your assistance and instruction!

P

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Thanks again for the assistance. I understand how this has to work. The Calendar / Structure paring is not seamless, but it won’t have any impact on a users ability to add entries via Structure.

Notes:
• As long as users are interacting with the month-view calendar and viewing single entry results, the process stays within the Structure method of creating URI’s.
• Once a user clicks the month toggle or an individual day numeral, the system exits Structure and defaults to the standard template group/template method for creating URI’s.

In order to keep the basic URI logical, I’ve moved all the templates to a Calendar template group.

Note for Devs:
1) Because the system reverts to a standard URI structure once a user clicks on a Month toggle or the Number for a specific day, any auto-generated navigation from Structure will disappear because it requires the Structure-created segment.  **This means navigation has to be hard-coded for Calendar pages.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Potential bug:
2) I’ve been able to get the Day calendar set up and functioning.  One potential bug or code omission I’ve found is that Reoccurring Events (ex. specific day each week) are not appearing in the hourly list. 
Note: Single events, all day events, and multiple all day events appear in the hourly list.

Avatar
RankRankRank

Total Posts: 107

Joined: Aug 19, 2005

PM

Ignore

 

I haven’t been able to duplicate locally. If you’re up for it you can PM me ftp login info and I can actually fiddle with the files to isolate the cause of the problem.

Rank

Total Posts: 16

Joined: May 8, 2009

PM

Ignore

 

I’m struggling to get the calendar working with structure, so any tips you have are much appreciated.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

mr_tim,

Can you be more specific?  Where is the set up breaking down for you?

Paul

Rank

Total Posts: 16

Joined: May 8, 2009

PM

Ignore

 

I’m just not entirely sure on how to set it up alongside Structure to keep the template structure for the links (e.g. event detail pages / day view) and allow entry of events through Structure.

Many thanks in advance for any pointers.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

My recommendation (and the method I used) is to treat the calendar like a blog.  In Structure, a “blog” is a “list”. You could set it up using the standard method, but that would clutter your Structure CP (file tree).

If you don’t know how to create list entries in Structure, you’ll have to learn.  Once you understand that process, you will need to select the Calendar weblog as the list, then select the Calendar Events weblog as the events (entries).  You will need two main templates - One for the Calendar (I used the Month version) and one for the Events results. 

For these two templates, Structure’s {page_url} parameter will link the calendar to the event. 

Once you get to this point, read through the threads above again. The Calendar module does not seamlessly integrate with Structure - The Day page and the Month toggles will only function using standard weblog URI’s.

RankRank

Total Posts: 41

Joined: Oct 13, 2007

PM

Ignore

 

Thanks again for the assistance Mr.Wison.  I’ve pretty much wrapped the dev on this initial Calendar install.  While the Structure integration isn’t as seamless as I’d like, it works well.  Just took a minute to understand how the module swaps between Structure and Calendar processes - I’m sure it’s possible to make the process seamless, but not worth my time.

One final question: 
I understand how to create multiple calendars using the two basic weblogs and alternate sets of templates. However, is it possible to simply use one set of templates and utilize a sortable drop menu to display alternate calendars?

I didn’t see this anywhere in the documentation.

Thanks, Paul