Yes, and presumably you can apply to every available Theme so this can’t be switched off? (to address @sarahann concern about this approach).
I could use display: none but it might now be as secure as we need it to be. And I figured it would be helpful to have a discussion on how to remove / change Discourse UI templates.
It’s tricky to do properly, unfortunately. For a big customer of ours who needs functionality removed, my approach has been to hide the elements with CSS and remove the controller side actions by using add_to_class to overwrite the methods with an error in plugin.rb.
I have a same problem. I’m working on plugin with topic, and I have to change the html structures but it’s impossible with only CSS. So I was tried to overwrite template but changes never applied.
So do you have find any solution for that?
You can override any template in the application if you like (although outlets are always preferred!). How were you doing it? did you confirm the name is exactly the same as the template you are replacing?
I tried to override the “list/topic-list-item.raw.hbs” template, but even though I removed all of the content in template, the topic items still appearing as original, any changing in override template never worked.
Please help me what I was wrong.
See: GitHub - discourse/discourse-simple-theme: Sam's simple discourse theme for an example of how it is done.
Hello,
When I run the command git grep “plugin-outlet” – “*.hbs” in my Linux Terminal, nothing shows up. Any ideas why? Thanks for your help!
Caveat: This is a sysadmin answer, not a plugin developer answer, and I can’t guess what you might have done before you did your git command.
Did you add it to git? What about
grep -r plugin-outlet .
Building on Jay’s shoulders here, you can of course focus on the specific file type:
grep -r "plugin-outlet" --include \*.hbs
Нужно ли что-то учитывать иначе, если плагин-выход выглядит так?
{{plugin-outlet name="users-top" connectorTagName="div" args=(hash model=model)}}
Означают ли атрибуты connectorTagName и args, что разработчики плагинов сталкиваются с особыми ограничениями или получают дополнительные возможности при использовании этих выходов?
Да, вы должны работать с API, которое предоставляют издатели.
В users-top вам передаётся model, который вы можете использовать, а коннектор в этом случае будет отрисован внутри div.
Я не нашел {{plugin-outlet}}. Я нашел несколько компонентов с таким же названием. Это одно и то же?

Похоже, код Discourse изменился, и руководство может устареть.
Ищу этот пример:
Я нашел вот что:
И с помощью этого замечательного компонента темы (deprecated) Plugin outlet locations theme component я могу увидеть этот выход там, где он должен быть:
Отвечая на ваш вопрос, я предполагаю, что это то же самое, но с новым синтаксисом.
Я также нашел этот тег. Не мог бы кто-нибудь подтвердить, что они все одинаковые?
{{~raw-plugin-outlet name="topic-list-after-title"}}
Самый актуальный справочник по плагин-розеткам находится здесь:
Я постараюсь обновить исходный пост здесь в ближайшие несколько дней.
Автор темы обновил пост новым синтаксисом и добавил ссылку на полную документацию
Я думаю, что команду следует обновить до:
git grep "<PluginOutlet" -- "*.gjs"
В этой ссылке указано «устарело».
Редактирование: Я нашёл ссылку для создания PR в первом сообщении, поэтому я создал PR.
Заменено на:

