# 第一个自定义顶部导航链接不应显示为已选中

**URL:** https://meta.discourse.org/t/the-first-custom-top-nav-link-inappropriately-appears-selected/369093
**Category:** Bug
**Tags:** top-navigation-links
**Created:** [2025 年6 月 6 日 03:54 UTC](https://meta.discourse.org/t/the-first-custom-top-nav-link-inappropriately-appears-selected/369093 "2025-06-06T03:54:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### 作者： ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### 发布日期： [2025 年6 月 6 日 03:54 UTC](https://meta.discourse.org/t/the-first-custom-top-nav-link-inappropriately-appears-selected/369093/1 "2025-06-06T03:54:11Z")

</div>

此主题组件目前存在一个重大问题：

> [@Custom Top Navigation Links](https://meta.discourse.org/t/custom-top-navigation-links/87225):
>
> discourse2Summary Custom Top Navigation Links allows you to add links to Discourse top navigation.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/custom-top-navigation-links)hammer_and_wrenchRepository Link [https://github.com/discourse/Discourse-nav-links-component](https://github.com/discourse/Discourse-nav-links-component)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features Desktop Mobile Settings: …

# 问题所在

第一个自定义顶部导航链接似乎被选中了；这当然是无稽之谈，因为它通常不是一个列表。这是我们的主页/最新列表：

 ![截图显示了 eHealth Forum 网站，其中有一个标题为“eHealth Forum 快速入门指南”的部分，其中包含有关如何使用该网站的说明，以及即将推出和热门主题的列表，包括“表格摘要 - 抄写员在此 - 下一个 AI 工具是什么……（由 AI 题注）](https://global.discourse-cdn.com/meta/original/4X/b/7/e/b7e671529908673d490f181803dab6bcf1fad76b.png)

# 移动端 - 效果更加明显。

这是因为切换按钮采用了（不恰当地）似乎被选中的自定义顶部导航链接的标签。

例如，这显示的是 `/latest` 列表，但在列表控件切换链接上显示的是 `Upcoming`，并且在下拉菜单中它似乎被选中了：

 ![截图显示了一个（由 AI 题注）](https://global.discourse-cdn.com/meta/original/4X/9/6/4/964d6adc2244fd9edea2292d721790f395b2eede.png)

---

<div class="post-metadata">

### 作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### 发布日期： [2025 年6 月 26 日 19:30 UTC](https://meta.discourse.org/t/the-first-custom-top-nav-link-inappropriately-appears-selected/369093/3 "2025-06-26T19:30:20Z")

</div>

您能分享一下导航链接设置的配置吗？“Upcoming”链接到的是分类/标签/还是其他什么？当我使用组件添加链接时，它似乎工作正常……

![image](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/4X/8/e/5/8e53db7cf1619b662fcf7a579d8935930595ca40.png)

---

<div class="post-metadata">

### 作者： ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### 发布日期： [2025 年6 月 26 日 20:29 UTC](https://meta.discourse.org/t/the-first-custom-top-nav-link-inappropriately-appears-selected/369093/4 "2025-06-26T20:29:17Z")

</div>

这可能是 #calendar-and-event 插件特有的问题（这就能解释为什么以前没有人抱怨过）。我们的配置将 Upcoming 指向我们专门的“事件”类别，另一个指向我们站点的日历。
