mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 18:05:55 +01:00 
			
		
		
		
	feat(docs): update calendar view
This commit is contained in:
		| @@ -32,11 +32,7 @@ Unlike other Book view types, the Calendar view also allows some kind of interac | |||||||
|  |  | ||||||
| The following attributes can be added to the book type: | The following attributes can be added to the book type: | ||||||
|  |  | ||||||
| | Name | Description | | <div class="joplin-table-wrapper"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>#calendar:hideWeekends</code></td><td>When present (regardless of value), it will hide Saturday and Sundays from the calendar.</td></tr><tr><td><code>#calendar:weekNumbers</code></td><td>When present (regardless of value), it will show the number of the week on the calendar.</td></tr><tr><td><code>#calendar:view</code></td><td><p>Which view to display in the calendar:</p><ul><li><code>timeGridWeek</code> for the <em>week</em> view;</li><li><code>dayGridMonth</code> for the <em>month</em> view;</li><li><code>multiMonthYear</code> for the <em>year</em> view;</li><li><code>listMonth</code> for the <em>list</em> view.</li></ul><p>Any other value will be dismissed and the default view (month) will be used instead.</p><p>The value of this label is automatically updated when changing the view using the UI buttons.</p></td></tr><tr><td><code>~child:template</code></td><td>Defines the template for newly created notes in the calendar (via dragging or clicking).</td></tr></tbody></table></div> | ||||||
| | --- | --- | |  | ||||||
| | `#calendar:hideWeekends` | When present (regardless of value), it will hide Saturday and Sundays from the calendar. | |  | ||||||
| | `#calendar:weekNumbers` | When present (regardless of value), it will show the number of the week on the calendar. | |  | ||||||
| | `~child:template` | Defines the template for newly created notes in the calendar (via dragging or clicking). | |  | ||||||
|  |  | ||||||
| In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings. | In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings. | ||||||
|  |  | ||||||
| @@ -48,13 +44,17 @@ For each note of the calendar, the following attributes can be used: | |||||||
| | --- | --- | | | --- | --- | | ||||||
| | `#startDate` | The date the event starts, which will display it in the calendar. The format is `YYYY-MM-DD` (year, month and day separated by a minus sign). | | | `#startDate` | The date the event starts, which will display it in the calendar. The format is `YYYY-MM-DD` (year, month and day separated by a minus sign). | | ||||||
| | `#endDate` | Similar to `startDate`, mentions the end date if the event spans across multiple days. The date is inclusive, so the end day is also considered. The attribute can be missing for single-day events. | | | `#endDate` | Similar to `startDate`, mentions the end date if the event spans across multiple days. The date is inclusive, so the end day is also considered. The attribute can be missing for single-day events. | | ||||||
|  | | `#startTime` | The time the event starts at. If this value is missing, then the event is considered a full-day event. The format is `HH:MM` (hours in 24-hour format and minutes). | | ||||||
|  | | `#endTime` | Similar to `startTime`, it mentions the time at which the event ends (in relation with `endDate` if present, or `startDate`). | | ||||||
| | `#color` | Displays the event with a specified color (named such as `red`, `gray` or hex such as `#FF0000`). This will also change the color of the note in other places such as the note tree. | | | `#color` | Displays the event with a specified color (named such as `red`, `gray` or hex such as `#FF0000`). This will also change the color of the note in other places such as the note tree. | | ||||||
| | `#calendar:color` | Similar to `#color`, but applies the color only for the event in the calendar and not for other places such as the note tree. | | | `#calendar:color` | Similar to `#color`, but applies the color only for the event in the calendar and not for other places such as the note tree. | | ||||||
| | `#iconClass` | If present, the icon of the note will be displayed to the left of the event title. | | | `#iconClass` | If present, the icon of the note will be displayed to the left of the event title. | | ||||||
| | `#calendar:title` | Changes the title of an event to point to an attribute of the note other than the title, either a label (e.g. `#assignee`) or a relation (e.g. `~for`). See _Advanced use-cases_ for more information. | | | `#calendar:title` | Changes the title of an event to point to an attribute of the note other than the title, either a label (e.g. `#assignee`) or a relation (e.g. `~for`). See _Advanced use-cases_ for more information. | | ||||||
| | `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this:   <br>  <br>  <br>  <br>`<br>#weight="70"<br>#Mood="Good"<br>#calendar:displayedAttributes="weight,Mood"<br>`  <br>  <br>It can also be used with relations, case in which it will display the title of the target note:  <br>  <br>`<br>~assignee=@My assignee<br>#calendar:displayedAttributes="assignee"<br>` | | | `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this:    <br>  <br>   <br>  <br>`#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"`  <br>  <br>It can also be used with relations, case in which it will display the title of the target note:   <br>  <br>`~assignee=@My assignee #calendar:displayedAttributes="assignee"` | | ||||||
| | `#calendar:startDate` | Allows using a different label to represent the start date, other than `startDate` (e.g. `expiryDate`). The label name **must not be** prefixed with `#`. If the label is not defined for a note, the default will be used instead. | | | `#calendar:startDate` | Allows using a different label to represent the start date, other than `startDate` (e.g. `expiryDate`). The label name **must not be** prefixed with `#`. If the label is not defined for a note, the default will be used instead. | | ||||||
| | `#calendar:endDate` | Allows using a different label to represent the start date, other than `endDate`. The label name **must not be** prefixed with `#`. If the label is not defined for a note, the default will be used instead. | | | `#calendar:endDate` | Similar to `#calendar:startDate`, allows changing the attribute which is being used to read the end date. | | ||||||
|  | | `#calendar:startTime` | Similar to `#calendar:startDate`, allows changing the attribute which is being used to read the start time. | | ||||||
|  | | `#calendar:endTime` | Similar to `#calendar:startDate`, allows changing the attribute which is being used to read the end time. | | ||||||
|  |  | ||||||
| ## How the calendar works | ## How the calendar works | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,36 +21,37 @@ | |||||||
|         <p>Unlike other Book view types, the Calendar view also allows some kind |         <p>Unlike other Book view types, the Calendar view also allows some kind | ||||||
|           of interaction, such as moving events around as well as creating new ones.</p> |           of interaction, such as moving events around as well as creating new ones.</p> | ||||||
|         <h2>Creating a calendar</h2> |         <h2>Creating a calendar</h2> | ||||||
|         <table> |         <figure class="table"> | ||||||
|           <thead> |           <table> | ||||||
|             <tr> |             <thead> | ||||||
|               <th></th> |               <tr> | ||||||
|               <th></th> |                 <th> </th> | ||||||
|               <th></th> |                 <th> </th> | ||||||
|             </tr> |                 <th> </th> | ||||||
|           </thead> |               </tr> | ||||||
|           <tbody> |             </thead> | ||||||
|             <tr> |             <tbody> | ||||||
|               <td>1</td> |               <tr> | ||||||
|               <td> |                 <td>1</td> | ||||||
|                 <img src="2_Calendar View_image.png"> |                 <td> | ||||||
|               </td> |                   <img src="2_Calendar View_image.png"> | ||||||
|               <td>The Calendar View works only for Book note types. To create a new note, |                 </td> | ||||||
|                 right click on the note tree on the left and select Insert note after, |                 <td>The Calendar View works only for Book note types. To create a new note, | ||||||
|                 or Insert child note and then select <em>Book</em>.</td> |                   right click on the note tree on the left and select Insert note after, | ||||||
|             </tr> |                   or Insert child note and then select <em>Book</em>.</td> | ||||||
|             <tr> |               </tr> | ||||||
|               <td>2</td> |               <tr> | ||||||
|               <td> |                 <td>2</td> | ||||||
|                 <img src="3_Calendar View_image.png"> |                 <td> | ||||||
|               </td> |                   <img src="3_Calendar View_image.png"> | ||||||
|               <td>Once created, the “View type” of the Book needs changed to “Calendar”, |                 </td> | ||||||
|                 by selecting the “Book Properties” tab in the ribbon.</td> |                 <td>Once created, the “View type” of the Book needs changed to “Calendar”, | ||||||
|             </tr> |                   by selecting the “Book Properties” tab in the ribbon.</td> | ||||||
|           </tbody> |               </tr> | ||||||
|         </table> |             </tbody> | ||||||
|          |           </table> | ||||||
| <h2>Creating a new event/note</h2> |         </figure> | ||||||
|  |         <h2>Creating a new event/note</h2> | ||||||
|         <ul> |         <ul> | ||||||
|           <li>Clicking on a day will create a new child note and assign it to that particular |           <li>Clicking on a day will create a new child note and assign it to that particular | ||||||
|             day. |             day. | ||||||
| @@ -82,234 +83,284 @@ | |||||||
|         </ul> |         </ul> | ||||||
|         <h2>Configuring the calendar</h2> |         <h2>Configuring the calendar</h2> | ||||||
|         <p>The following attributes can be added to the book type:</p> |         <p>The following attributes can be added to the book type:</p> | ||||||
|         <table> |         <figure class="table"> | ||||||
|           <thead> |           <table> | ||||||
|             <tr> |             <thead> | ||||||
|               <th>Name</th> |               <tr> | ||||||
|               <th>Description</th> |                 <th>Name</th> | ||||||
|             </tr> |                 <th>Description</th> | ||||||
|           </thead> |               </tr> | ||||||
|           <tbody> |             </thead> | ||||||
|             <tr> |             <tbody> | ||||||
|               <td><code>#calendar:hideWeekends</code> |               <tr> | ||||||
|               </td> |                 <td><code>#calendar:hideWeekends</code> | ||||||
|               <td>When present (regardless of value), it will hide Saturday and Sundays |                 </td> | ||||||
|                 from the calendar.</td> |                 <td>When present (regardless of value), it will hide Saturday and Sundays | ||||||
|             </tr> |                   from the calendar.</td> | ||||||
|             <tr> |               </tr> | ||||||
|               <td><code>#calendar:weekNumbers</code> |               <tr> | ||||||
|               </td> |                 <td><code>#calendar:weekNumbers</code> | ||||||
|               <td>When present (regardless of value), it will show the number of the week |                 </td> | ||||||
|                 on the calendar.</td> |                 <td>When present (regardless of value), it will show the number of the week | ||||||
|             </tr> |                   on the calendar.</td> | ||||||
|             <tr> |               </tr> | ||||||
|               <td><code>~child:template</code> |               <tr> | ||||||
|               </td> |                 <td><code>#calendar:view</code> | ||||||
|               <td>Defines the template for newly created notes in the calendar (via dragging |                 </td> | ||||||
|                 or clicking).</td> |                 <td> | ||||||
|             </tr> |                   <p>Which view to display in the calendar:</p> | ||||||
|           </tbody> |                   <ul> | ||||||
|         </table> |                     <li><code>timeGridWeek</code> for the <em>week</em> view;</li> | ||||||
|  |                     <li><code>dayGridMonth</code> for the <em>month</em> view;</li> | ||||||
|  |                     <li><code>multiMonthYear</code> for the <em>year</em> view;</li> | ||||||
|  |                     <li><code>listMonth</code> for the <em>list</em> view.</li> | ||||||
|  |                   </ul> | ||||||
|  |                   <p>Any other value will be dismissed and the default view (month) will be | ||||||
|  |                     used instead.</p> | ||||||
|  |                   <p>The value of this label is automatically updated when changing the view | ||||||
|  |                     using the UI buttons.</p> | ||||||
|  |                 </td> | ||||||
|  |               </tr> | ||||||
|  |               <tr> | ||||||
|  |                 <td><code>~child:template</code> | ||||||
|  |                 </td> | ||||||
|  |                 <td>Defines the template for newly created notes in the calendar (via dragging | ||||||
|  |                   or clicking).</td> | ||||||
|  |               </tr> | ||||||
|  |             </tbody> | ||||||
|  |           </table> | ||||||
|  |         </figure> | ||||||
|         <p>In addition, the first day of the week can be either Sunday or Monday |         <p>In addition, the first day of the week can be either Sunday or Monday | ||||||
|           and can be adjusted from the application settings.</p> |           and can be adjusted from the application settings.</p> | ||||||
|         <h2>Configuring the calendar events</h2> |         <h2>Configuring the calendar events</h2> | ||||||
|         <p>For each note of the calendar, the following attributes can be used:</p> |         <p>For each note of the calendar, the following attributes can be used:</p> | ||||||
|         <table> |         <figure | ||||||
|           <thead> |         class="table"> | ||||||
|             <tr> |           <table> | ||||||
|               <th>Name</th> |             <thead> | ||||||
|               <th>Description</th> |               <tr> | ||||||
|             </tr> |                 <th>Name</th> | ||||||
|           </thead> |                 <th>Description</th> | ||||||
|           <tbody> |               </tr> | ||||||
|             <tr> |             </thead> | ||||||
|               <td><code>#startDate</code> |             <tbody> | ||||||
|               </td> |               <tr> | ||||||
|               <td>The date the event starts, which will display it in the calendar. The |                 <td><code>#startDate</code> | ||||||
|                 format is <code>YYYY-MM-DD</code> (year, month and day separated by a minus |                 </td> | ||||||
|                 sign).</td> |                 <td>The date the event starts, which will display it in the calendar. The | ||||||
|             </tr> |                   format is <code>YYYY-MM-DD</code> (year, month and day separated by a minus | ||||||
|             <tr> |                   sign).</td> | ||||||
|               <td><code>#endDate</code> |               </tr> | ||||||
|               </td> |               <tr> | ||||||
|               <td>Similar to <code>startDate</code>, mentions the end date if the event spans |                 <td><code>#endDate</code> | ||||||
|                 across multiple days. The date is inclusive, so the end day is also considered. |                 </td> | ||||||
|                 The attribute can be missing for single-day events.</td> |                 <td>Similar to <code>startDate</code>, mentions the end date if the event spans | ||||||
|             </tr> |                   across multiple days. The date is inclusive, so the end day is also considered. | ||||||
|             <tr> |                   The attribute can be missing for single-day events.</td> | ||||||
|               <td><code>#color</code> |               </tr> | ||||||
|               </td> |               <tr> | ||||||
|               <td>Displays the event with a specified color (named such as <code>red</code>, <code>gray</code> or |                 <td><code>#startTime</code> | ||||||
|                 hex such as <code>#FF0000</code>). This will also change the color of the |                 </td> | ||||||
|                 note in other places such as the note tree.</td> |                 <td>The time the event starts at. If this value is missing, then the event | ||||||
|             </tr> |                   is considered a full-day event. The format is <code>HH:MM</code> (hours in | ||||||
|             <tr> |                   24-hour format and minutes).</td> | ||||||
|               <td><code>#calendar:color</code> |               </tr> | ||||||
|               </td> |               <tr> | ||||||
|               <td>Similar to <code>#color</code>, but applies the color only for the event |                 <td><code>#endTime</code> | ||||||
|                 in the calendar and not for other places such as the note tree.</td> |                 </td> | ||||||
|             </tr> |                 <td>Similar to <code>startTime</code>, it mentions the time at which the event | ||||||
|             <tr> |                   ends (in relation with <code>endDate</code> if present, or <code>startDate</code>).</td> | ||||||
|               <td><code>#iconClass</code> |               </tr> | ||||||
|               </td> |               <tr> | ||||||
|               <td>If present, the icon of the note will be displayed to the left of the |                 <td><code>#color</code> | ||||||
|                 event title.</td> |                 </td> | ||||||
|             </tr> |                 <td>Displays the event with a specified color (named such as <code>red</code>, <code>gray</code> or | ||||||
|             <tr> |                   hex such as <code>#FF0000</code>). This will also change the color of the | ||||||
|               <td><code>#calendar:title</code> |                   note in other places such as the note tree.</td> | ||||||
|               </td> |               </tr> | ||||||
|               <td>Changes the title of an event to point to an attribute of the note other |               <tr> | ||||||
|                 than the title, either a label (e.g. <code>#assignee</code>) or a relation |                 <td><code>#calendar:color</code> | ||||||
|                 (e.g. <code>~for</code>). See <em>Advanced use-cases</em> for more information.</td> |                 </td> | ||||||
|             </tr> |                 <td>Similar to <code>#color</code>, but applies the color only for the event | ||||||
|             <tr> |                   in the calendar and not for other places such as the note tree.</td> | ||||||
|               <td><code>#calendar:displayedAttributes</code> |               </tr> | ||||||
|               </td> |               <tr> | ||||||
|               <td>Allows displaying the value of one or more attributes in the calendar |                 <td><code>#iconClass</code> | ||||||
|                 like this:  |                 </td> | ||||||
|                 <br> |                 <td>If present, the icon of the note will be displayed to the left of the | ||||||
|                 <br> |                   event title.</td> | ||||||
|                 <img src="11_Calendar View_image.png"> |               </tr> | ||||||
|                 <br> |               <tr> | ||||||
|                 <br><code><br>#weight="70"<br>#Mood="Good"<br>#calendar:displayedAttributes="weight,Mood"<br></code>  |                 <td><code>#calendar:title</code> | ||||||
|                 <br> |                 </td> | ||||||
|                 <br>It can also be used with relations, case in which it will display the |                 <td>Changes the title of an event to point to an attribute of the note other | ||||||
|                 title of the target note: |                   than the title, either a label (e.g. <code>#assignee</code>) or a relation | ||||||
|                 <br> |                   (e.g. <code>~for</code>). See <em>Advanced use-cases</em> for more information.</td> | ||||||
|                 <br><code><br>~assignee=@My assignee<br>#calendar:displayedAttributes="assignee"<br></code> |               </tr> | ||||||
|               </td> |               <tr> | ||||||
|             </tr> |                 <td><code>#calendar:displayedAttributes</code> | ||||||
|             <tr> |                 </td> | ||||||
|               <td><code>#calendar:startDate</code> |                 <td>Allows displaying the value of one or more attributes in the calendar | ||||||
|               </td> |                   like this:   | ||||||
|               <td>Allows using a different label to represent the start date, other than <code>startDate</code> (e.g. <code>expiryDate</code>). |                   <br> | ||||||
|                 The label name <strong>must not be</strong> prefixed with <code>#</code>. |                   <br> | ||||||
|                 If the label is not defined for a note, the default will be used instead.</td> |                   <img src="11_Calendar View_image.png">  | ||||||
|             </tr> |                   <br> | ||||||
|             <tr> |                   <br><code>#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"</code> | ||||||
|               <td><code>#calendar:endDate</code> |                   <br> | ||||||
|               </td> |                   <br>It can also be used with relations, case in which it will display the | ||||||
|               <td>Allows using a different label to represent the start date, other than <code>endDate</code>. |                   title of the target note:  | ||||||
|                 The label name <strong>must not be</strong> prefixed with <code>#</code>. |                   <br> | ||||||
|                 If the label is not defined for a note, the default will be used instead.</td> |                   <br><code>~assignee=@My assignee #calendar:displayedAttributes="assignee"</code> | ||||||
|             </tr> |                 </td> | ||||||
|           </tbody> |               </tr> | ||||||
|         </table> |               <tr> | ||||||
|          |                 <td><code>#calendar:startDate</code> | ||||||
| <h2>How the calendar works</h2> |                 </td> | ||||||
|         <p> |                 <td>Allows using a different label to represent the start date, other than <code>startDate</code> (e.g. <code>expiryDate</code>). | ||||||
|           <img src="14_Calendar View_image.png"> |                   The label name <strong>must not be</strong> prefixed with <code>#</code>. | ||||||
|         </p> |                   If the label is not defined for a note, the default will be used instead.</td> | ||||||
|         <p>The calendar displays all the child notes of the book that have a <code>#startDate</code>. |               </tr> | ||||||
|           An <code>#endDate</code> can optionally be added.</p> |               <tr> | ||||||
|         <p>If editing the start date and end date from the note itself is desirable, |                 <td><code>#calendar:endDate</code> | ||||||
|           the following attributes can be added to the book note:</p><pre><code class="language-text-x-trilium-auto">#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" |                 </td> | ||||||
|  |                 <td>Similar to <code>#calendar:startDate</code>, allows changing the attribute | ||||||
|  |                   which is being used to read the end date.</td> | ||||||
|  |               </tr> | ||||||
|  |               <tr> | ||||||
|  |                 <td><code>#calendar:startTime</code> | ||||||
|  |                 </td> | ||||||
|  |                 <td>Similar to <code>#calendar:startDate</code>, allows changing the attribute | ||||||
|  |                   which is being used to read the start time.</td> | ||||||
|  |               </tr> | ||||||
|  |               <tr> | ||||||
|  |                 <td><code>#calendar:endTime</code> | ||||||
|  |                 </td> | ||||||
|  |                 <td>Similar to <code>#calendar:startDate</code>, allows changing the attribute | ||||||
|  |                   which is being used to read the end time.</td> | ||||||
|  |               </tr> | ||||||
|  |             </tbody> | ||||||
|  |           </table> | ||||||
|  |           </figure> | ||||||
|  |           <h2>How the calendar works</h2> | ||||||
|  |           <p> | ||||||
|  |             <img src="14_Calendar View_image.png"> | ||||||
|  |           </p> | ||||||
|  |           <p>The calendar displays all the child notes of the book that have a <code>#startDate</code>. | ||||||
|  |             An <code>#endDate</code> can optionally be added.</p> | ||||||
|  |           <p>If editing the start date and end date from the note itself is desirable, | ||||||
|  |             the following attributes can be added to the book note:</p><pre><code class="language-text-x-trilium-auto">#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" | ||||||
| #label:endDate(inheritable)="promoted,alias=End Date,single,date" | #label:endDate(inheritable)="promoted,alias=End Date,single,date" | ||||||
| #hidePromotedAttributes </code></pre> | #hidePromotedAttributes </code></pre> | ||||||
|         <p>This will result in:</p> |           <p>This will result in:</p> | ||||||
|         <p> |           <p> | ||||||
|           <img src="12_Calendar View_image.png"> |             <img src="12_Calendar View_image.png"> | ||||||
|         </p> |           </p> | ||||||
|         <p>When not used in a Journal, the calendar is recursive. That is, it will |           <p>When not used in a Journal, the calendar is recursive. That is, it will | ||||||
|           look for events not just in its child notes but also in the children of |             look for events not just in its child notes but also in the children of | ||||||
|           these child notes.</p> |             these child notes.</p> | ||||||
|         <h2>Use-cases</h2> |           <h2>Use-cases</h2> | ||||||
|         <h3>Using with the Journal / calendar</h3> |           <h3>Using with the Journal / calendar</h3> | ||||||
|         <p>It is possible to integrate the calendar view into the Journal with day |           <p>It is possible to integrate the calendar view into the Journal with day | ||||||
|           notes. In order to do so change the note type of the Journal note (calendar |             notes. In order to do so change the note type of the Journal note (calendar | ||||||
|           root) to Book and then select the Calendar View.</p> |             root) to Book and then select the Calendar View.</p> | ||||||
|         <p>Based on the <code>#calendarRoot</code> (or <code>#workspaceCalendarRoot</code>) |           <p>Based on the <code>#calendarRoot</code> (or <code>#workspaceCalendarRoot</code>) | ||||||
|           attribute, the calendar will know that it's in a calendar and apply the |             attribute, the calendar will know that it's in a calendar and apply the | ||||||
|           following:</p> |             following:</p> | ||||||
|         <ul> |           <ul> | ||||||
|           <li>The calendar events are now rendered based on their <code>dateNote</code> attribute |             <li>The calendar events are now rendered based on their <code>dateNote</code> attribute | ||||||
|             rather than <code>startDate</code>.</li> |               rather than <code>startDate</code>.</li> | ||||||
|           <li>Interactive editing such as dragging over an empty era or resizing an |             <li>Interactive editing such as dragging over an empty era or resizing an | ||||||
|             event is no longer possible.</li> |               event is no longer possible.</li> | ||||||
|           <li>Clicking on the empty space on a date will automatically open that day's |             <li>Clicking on the empty space on a date will automatically open that day's | ||||||
|             note or create it if it does not exist.</li> |               note or create it if it does not exist.</li> | ||||||
|           <li>Direct children of a day note will be displayed on the calendar despite |             <li>Direct children of a day note will be displayed on the calendar despite | ||||||
|             not having a <code>dateNote</code> attribute. Children of the child notes |               not having a <code>dateNote</code> attribute. Children of the child notes | ||||||
|             will not be displayed.</li> |               will not be displayed.</li> | ||||||
|         </ul> |           </ul> | ||||||
|         <p> |           <p> | ||||||
|           <img src="10_Calendar View_image.png"> |             <img src="10_Calendar View_image.png"> | ||||||
|         </p> |           </p> | ||||||
|         <h3>Using a different attribute as event title</h3> |           <h3>Using a different attribute as event title</h3> | ||||||
|         <p>By default, events are displayed on the calendar by their note title. |           <p>By default, events are displayed on the calendar by their note title. | ||||||
|           However, it is possible to configure a different attribute to be displayed |             However, it is possible to configure a different attribute to be displayed | ||||||
|           instead.</p> |             instead.</p> | ||||||
|         <p>To do so, assign <code>#calendar:title</code> to the child note (not the |           <p>To do so, assign <code>#calendar:title</code> to the child note (not the | ||||||
|           calendar/book note), with the value being <code>#name</code> where <code>name</code> can |             calendar/book note), with the value being <code>#name</code> where <code>name</code> can | ||||||
|           be any label. The attribute can also come through inheritance such as a |             be any label. The attribute can also come through inheritance such as a | ||||||
|           template attribute. If the note does not have the requested label, the |             template attribute. If the note does not have the requested label, the | ||||||
|           title of the note will be used instead.</p> |             title of the note will be used instead.</p> | ||||||
|         <table> |           <figure class="table"> | ||||||
|           <thead> |             <table> | ||||||
|             <tr> |               <thead> | ||||||
|               <th></th> |                 <tr> | ||||||
|               <th></th> |                   <th> </th> | ||||||
|             </tr> |                   <th> </th> | ||||||
|           </thead> |                 </tr> | ||||||
|           <tbody> |               </thead> | ||||||
|             <tr> |               <tbody> | ||||||
|               <td> |                 <tr> | ||||||
|                 <img src="5_Calendar View_image.png"> |                   <td> | ||||||
|               </td> |                     <img src="5_Calendar View_image.png"> | ||||||
|               <td> |                   </td> | ||||||
|                 <img src="7_Calendar View_image.png"> |                   <td> | ||||||
|               </td> |                     <img src="7_Calendar View_image.png"> | ||||||
|             </tr> |                   </td> | ||||||
|           </tbody> |                 </tr> | ||||||
|         </table> |               </tbody> | ||||||
|          |             </table> | ||||||
| <h3>Using a relation attribute as event title</h3> |           </figure> | ||||||
|         <p>Similarly to using an attribute, use <code>#calendar:title</code> and set |           <h3>Using a relation attribute as event title</h3> | ||||||
|           it to <code>~name</code> where <code>name</code> is the name of the relation |           <p>Similarly to using an attribute, use <code>#calendar:title</code> and set | ||||||
|           to use.</p> |             it to <code>~name</code> where <code>name</code> is the name of the relation | ||||||
|         <p>Moreover, if there are more relations of the same name, they will be displayed |             to use.</p> | ||||||
|           as multiple events coming from the same note.</p> |           <p>Moreover, if there are more relations of the same name, they will be displayed | ||||||
|         <table> |             as multiple events coming from the same note.</p> | ||||||
|           <thead> |           <figure class="table"> | ||||||
|             <tr> |             <table> | ||||||
|               <th></th> |               <thead> | ||||||
|               <th></th> |                 <tr> | ||||||
|             </tr> |                   <th> </th> | ||||||
|           </thead> |                   <th> </th> | ||||||
|           <tbody> |                 </tr> | ||||||
|             <tr> |               </thead> | ||||||
|               <td> |               <tbody> | ||||||
|                 <img src="6_Calendar View_image.png"> |                 <tr> | ||||||
|               </td> |                   <td> | ||||||
|               <td> |                     <img src="6_Calendar View_image.png"> | ||||||
|                 <img src="8_Calendar View_image.png"> |                   </td> | ||||||
|               </td> |                   <td> | ||||||
|             </tr> |                     <img src="8_Calendar View_image.png"> | ||||||
|           </tbody> |                   </td> | ||||||
|         </table> |                 </tr> | ||||||
|         <p>Note that it's even possible to have a <code>#calendar:title</code> on the |               </tbody> | ||||||
|           target note (e.g. “John Smith”) which will try to render an attribute of |             </table> | ||||||
|           it. Note that it's not possible to use a relation here as well for safety |           </figure> | ||||||
|           reasons (an accidental recursion  of attributes could cause the application |           <p>Note that it's even possible to have a <code>#calendar:title</code> on the | ||||||
|           to loop infinitely).</p> |             target note (e.g. “John Smith”) which will try to render an attribute of | ||||||
|         <table> |             it. Note that it's not possible to use a relation here as well for safety | ||||||
|           <thead> |             reasons (an accidental recursion  of attributes could cause the application | ||||||
|             <tr> |             to loop infinitely).</p> | ||||||
|               <th></th> |           <figure class="table"> | ||||||
|               <th></th> |             <table> | ||||||
|             </tr> |               <thead> | ||||||
|           </thead> |                 <tr> | ||||||
|           <tbody> |                   <th> </th> | ||||||
|             <tr> |                   <th> </th> | ||||||
|               <td> |                 </tr> | ||||||
|                 <img src="13_Calendar View_image.png"> |               </thead> | ||||||
|               </td> |               <tbody> | ||||||
|               <td> |                 <tr> | ||||||
|                 <img src="1_Calendar View_image.png"> |                   <td> | ||||||
|               </td> |                     <img src="13_Calendar View_image.png"> | ||||||
|             </tr> |                   </td> | ||||||
|           </tbody> |                   <td> | ||||||
|         </table> |                     <img src="1_Calendar View_image.png"> | ||||||
|  |                   </td> | ||||||
|  |                 </tr> | ||||||
|  |               </tbody> | ||||||
|  |             </table> | ||||||
|  |           </figure> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|   </body> |   </body> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user