I'm currently building a content aggregator which is basically a template with macros that fetch selected content from previously defined spaces.
I also would like to embed the calendars that are related to the selected spaces and thus want to know if it's possible to get the calendars by space key. I usually use these in my macros but couldn't find a similar documentation for teamcalendars. It would be great if i wouldn't have to write crazy sql marcos for that :)
Community moderators have prevented the ability to post new answers.
Hi Superuschi,
AFAIK, Team Calendars are not related to spaces. If there is a calendar that is called in a space, the home page for example, you might be able to reference that macro by getting spacekey/home then the macro for TC on that page. However, TC does not store a calendar via space any longer (and by any longer I mean that pre Confluence 3.5 when the legacy calendar let you instantiate a calendar on a page and it lived there forever). TC stores it's calendars in a centralized location in the database and allows it to be referenced on any page/space for viewing and updating.
That being said, you could just embed the related calendars but I don't know if you'll find a spacekey+calendar relation to go off of (but look for spacekey/home pages calendar macro!). /sadface
Hope that helps!
Thanks Ryan. I found out that inside the bandana table there's an entry for each calendar with a string like
<string>{"id":"05b50338-9b4f-432a-ad75-f3eaca0ccbd6", "color":"subcalendar-turquoise", "description":"", "name":"test kalender", "spaceKey":"SPACEKEY", "creator":"user.name", "timeZoneId":"Europe/Berlin"}</string>
The ID is stored in a separate field, so I will use an sql query and get the ID by searching for "spaceKey":"SPACEKEY". With the IDs I can embed the calendars using
<ac:macro ac:name="calendar"><ac:parameter ac:name="id">ab4acba0-a222-4b82-a39d-af79b1a88881,7dbda511-84ca-4868-99db-3aac5e758f6f,bdaee45b-5cab-4483-916b-373f405451ad</ac:parameter><ac:parameter ac:name="width">600</ac:parameter><ac:parameter ac:name="hideWeekends">true</ac:parameter></ac:macro>
Maybe this is hopeful for others. I can post the complete macro code once I'm done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So Ryan is somewhat correct in that Calednars live outside spaces. However, when you create a calendar form the editor, or from the main "My Calendars" view, you have the opportunity to link it to a space. To be honest, we haven't yet done anything with this feature and need to improve work on it.
Can I ask why you are trying to find related calendars in space? What will you do with that information? Just trying to see if there is something we can do better here...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OFC :)
Our non-technical staff has problems with keeping up-to-date in confluence, we're using it for project documentation (and jira for task management), and they're not as creative with macros (which basically provide everything they need, but well....) as our technical staff is.
We have one big project with 40 sub-projects coming up and were thinking about an easy and convenient way to monitor them, so I am building a page template which allows a user to select 1 to n projects and the macros they want to use (blogs, recently updated, attachments, calendars) with checkboxes. The project selection list is filter-able with jquery, as we already have quite a lot. The result is an indiviual page that shows the selected information for the selected projects. so basically it pre-fills the macro parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.