# 在 discovery-list-container-top Outlet 上方渲染一个帖子

**URL:** <https://meta.discourse.org/t/render-a-post-above-the-discovery-list-container-top-outlet/394270>\
**Category:** Development\
**Created:** [2026年一月24日 23:52 UTC](https://meta.discourse.org/t/render-a-post-above-the-discovery-list-container-top-outlet/394270 "2026-01-24T23:52:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Post date:** [2026年一月25日 01:30 UTC](https://meta.discourse.org/t/render-a-post-above-the-discovery-list-container-top-outlet/394270/4 "2026-01-25T01:30:28Z")

</div>

我试过 `let`，结果也是一样的。只是我通常在用 `fetch()` 或 `ajax()` 时会用 `const`。

我相信错误来自于 `static template = ` 这行。用了它，我得到：

```plaintext
[THEME 10283 'Pokemon Theme'] Error: connector component has no associated template. Ensure the template is colocated or authored with gjs.
    at h (plugin-connectors.js:35:11)
    at eY.renderInOutlet (plugin-api.gjs:1116:5)
    at todo.gjs:43:7
    at eH (plugin-api.gjs:3363:10)
    at Object.initialize (api.js:21:14)
    at i.initialize (app.js:265:28)
    at index.js:379:19
    at e.each (index.js:183:7)
    at e.walk (index.js:112:10)
    at e.each (index.js:59:20)
    at e.topsort (index.js:65:10)
    at iL._runInitializer (index.js:392:11)
    at iL.runInstanceInitializers (index.js:377:10)
    at l._bootSync (instance.js:116:22)
    at iL.didBecomeReady (index.js:784:18)
    at invoke (index.js:262:14)
    at m.flush (index.js:180:11)
    at g.flush (index.js:334:19)
    at z._end (index.js:762:32)
    at _boundAutorunEnd (index.js:499:12)

```

如果我直接使用 `\u003ctemplate\u003e`，就不会有错误。我不认为在这里使用 `static template` 是有效的，所以直接使用模板标签就可以了。

---

_[View the full topic](https://meta.discourse.org/t/render-a-post-above-the-discovery-list-container-top-outlet/394270)._
