# body 标签中的自定义内容在某些页面上不会显示

**URL:** <https://meta.discourse.org/t/customization-in-body-tag-wont-appear-in-some-pages/105167>\
**Category:** Feature\
**Created:** [2018年十二月27日 21:46 UTC](https://meta.discourse.org/t/customization-in-body-tag-wont-appear-in-some-pages/105167 "2018-12-27T21:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo.proctor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leo.proctor/32/216158_2.png) [@leo.proctor](https://meta.discourse.org/u/leo.proctor)\
**Post date:** [2018年十二月27日 21:46 UTC](https://meta.discourse.org/t/customization-in-body-tag-wont-appear-in-some-pages/105167/1 "2018-12-27T21:46:41Z")

</div>

If I add some customization in body tag like a div as shown in below screenshot:

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/d/0/d0babb5a979521881985041dfb111fe1c7e94981.png)

The div appears in normal pages, but it won’t appear in some pages like (topic not found) page: for example  
[https://meta.discourse.org/t/123456778888888](https://meta.discourse.org/t/123456778888888)

While other customization works as expected that is added via head Header Footer etc.

---

<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:** [2018年十二月31日 00:48 UTC](https://meta.discourse.org/t/customization-in-body-tag-wont-appear-in-some-pages/105167/2 "2018-12-31T00:48:39Z")

</div>

This is somewhat tricky

> <https://github.com/discourse/discourse/blob/a19170a4c2c37bb6f6ae9531fe4f925777f3e8d5/app/views/layouts/no_ember.html.erb#L2-L28>

I can spot two issues here …

1. `footer` is not in footer tag. Which may be very tricky to fix if static pages add footer already.

2. We are missing `<%= raw theme_lookup("body_tag") %>`

(2) is probably very simple and safe to add… (1) is hard.

@Johani can you add this to your list to determine if (2) is safe and just do a PR for it.

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [2019年七月31日 07:10 UTC](https://meta.discourse.org/t/customization-in-body-tag-wont-appear-in-some-pages/105167/3 "2019-07-31T07:10:58Z")

</div>

我们现在在所有相关视图中更一致地查找主题字段。

> <https://github.com/discourse/discourse/commit/340173eb121da6d3db899bf8c802fa78a24c068f>
>
> \* removes \`raw\` helpers
> 
> \* include theme footer in the crawler view
> 
> \* inclu…de theme body tag content in no-ember pages

感谢您报告此问题 @leo.proctor 👍
