Varhall
(fedor)
August 16, 2020, 2:28pm
1
Hi all!
In my custom theme i override template topic-list-item.hbr but it affected the related topics, messages, etc. How can I override this template only for the main list of topics, categories and tags?
Such a list of topics breaks the layout for the list of messages and does not look very good, I would like to leave the old list there
1 Like
fzngagan
(Faizaan Gagan)
August 16, 2020, 2:38pm
2
This writeup might be helpful
Let’s take topic-list-item template as an example. The template for it is a raw template. Raw templates require explicit code to render them. If you look at the above snippet, a path(relative to templates/) is being passed here. Add your custom...
Reading time: 1 mins 🕑
Likes: 4 ❤
I realize that the condition you need to use is non-trivial.
4 Likes
Varhall
(fedor)
August 16, 2020, 2:49pm
3
I do not quite understand, can you tell us a little? Or maybe there is more information about this
1 Like
fzngagan
(Faizaan Gagan)
August 16, 2020, 3:00pm
4
As I said, its non-trivial. But its would be really interesting to know whether there’s interest among other devs or the discourse team to facilitate this in a simpler manner.
1 Like
Varhall
(fedor)
August 16, 2020, 3:03pm
5
Here is some information about it
Just to clarify this bit first
This is not correct, you don’t lose your changes when you update if they’re made in a theme. They persist. The only way you lose your changes is if you directly edit the files on your server, which you obviously shouldn’t do.
Now, there is a certain amount of risk involved in overriding templates in that an update in core might mean that your changes are not compatible anymore and would need to be updated. If you’re fine with that risk then you can technically a…
1 Like