# 类别日历未显示（重新打开）

**URL:** https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465
**Category:** UX
**Tags:** events
**Created:** [2023年十一月14日 19:06 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465 "2023-11-14T19:06:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Thomas\_Rother](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_rother/32/423597_2.png) [@Thomas\_Rother](https://meta.discourse.org/u/Thomas_Rother)
#### Post date: [2023年十一月14日 19:06 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465/1 "2023-11-14T19:06:41Z")

</div>

我无法将类别添加到“日历类别”设置中：

 ![grafik](https://global.discourse-cdn.com/meta/original/4X/a/d/8/ad837b0f2ccbacdfef968bcee0925055726e893d.png)

单击加号按钮仅显示停止标志……

这已经在 [Category calendar not displaying](https://meta.discourse.org/t/category-calendar-not-displaying/273459) 中讨论过，并与 [FIX: add outlet names, they're no longer passed in by awesomerobot · Pull Request #424 · discourse/discourse-calendar · GitHub](https://github.com/discourse/discourse-calendar/pull/424) 合并

当前 3.2.0.beta4-dev 中可能存在回归？

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2023年十一月14日 19:30 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465/2 "2023-11-14T19:30:08Z")

</div>

此设置要求您提供类别 ID 和帖子 ID。  
您将看不到类别下拉列表。我理解这可能会令人困惑！

与描述类似，您必须输入，例如：`categoryId=6;postId=453`。

> `categoryId` 是日历将显示在其顶部的类别。  
> `postId` 是您使用 `[calendar][/calendar]` 放置日历的帖子。

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [2023年十一月14日 19:49 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465/3 "2023-11-14T19:49:32Z")

</div>

只是进一步澄清，此网站设置会将特定 **帖子** 的日历放入 **类别** 视图。

还有一个不同的设置，“`events calendar categories`”（事件日历类别），您可以在其中选择要启用顶部日历的类别，显示该类别中创建的主题的事件。

---

<div class="post-metadata">

### Author: ![Thomas\_Rother](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_rother/32/423597_2.png) [@Thomas\_Rother](https://meta.discourse.org/u/Thomas_Rother)
#### Post date: [2023年十一月14日 19:56 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465/4 "2023-11-14T19:56:33Z")

</div>

@renato 感谢您提供的补充说明，这解答了我的一些疑问……🥰

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2023年十一月15日 00:17 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465/5 "2023-11-15T00:17:34Z")

</div>

我已经将这个问题移到了 #Contribute > UX 频道，因为那里的加号按钮让人感觉困惑且没有必要。但我不确定这里是否真的存在 bug？

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [2024年三月6日 17:42 UTC](https://meta.discourse.org/t/category-calendar-not-displaying-reopen/285465/6 "2024-03-06T17:42:40Z")

</div>

我无法让此功能正常工作。我在文本框中插入了有效的 `categoryId=` 和 `postId=`，并用分号分隔。但是日历没有显示。

主题 ID 是 30，因此查看 `/t/30.json` 端点会产生关于帖子的数据，所以我可以获取帖子 ID。类别 ID 可以很容易地从 URL 中获取，但将它们放入框中没有任何效果。

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/d/e/0de7e08d99ae24eab5030e6a13124f4b72f0602b.png)

我也忍不住觉得管理面板应该有更清晰的区别来解释“事件日历类别”和“日历类别”之间的区别，因为功能非常相似，但又不完全相同。

据我所知，区别在于“在类别顶部显示事件日历”将显示一个 `[event][/event]` 事件的日历（尽管_选择_了一个类别后，它并没有解释你 **也** 需要在该类别的一个主题中创建 `[calendar] (换行) [/calendar]`）。

而“日历类别”（“在类别顶部显示日历”）的区别仅仅是省略了“事件”一词（快速阅读时很容易错过），具有_完全不同的语法_，并且允许你显示任何 `[calendar] (换行符，否则无效) [/calendar]`，其中可以包含 `[date]` 对象。

管理界面是否有任何方法可以更清晰一些？即使它需要链接回 Meta 上的指南，那也算是有所帮助。
