can i target only one page with injected html?

welcome any pointers here.

i want to add a small html block on just one page, not site-wide. i’m trying to keep it simple for a campaign landing page, but i do not want it showing anywhere else. is there a clean way to scope that in Discourse without editing a bunch of templates?

Tagged:

Comments

  • Yes. The cleanest approach is to use a theme component or plugin outlet that checks the route before rendering. Gate the markup on the specific path or controller name, then keep the html in one place. That avoids editing core templates and makes removal easy later.

  • i was able to do this with a route check in the theme component. much easier than copying a whole template.