See this update to pruning users
Way to parse topics titles
I installed katex on my nodebb forum and it parses well my shoutbox messages (using filter:parse.raw hook) and posts contents (using action:markdown.updateParserRules and filter:composer.formatting hooks) to get mathematical formulas with a good display.
But, topics titles are not parsed (and also breadcrumbs). What could be the simplest way to parse these ? Which hook(s) do you recommend ?
Thanks in advance !
You can use
filter:topic.buildon the topic page. For the category page it would be
filter:category.buildfor the recent page it would be
@baris Ok. I will try as you say (I was thinking about filter:controllers.topic.get to unify things but there may be bad things with this idea).
@baris Finally, I used filter:topics.get because, with template.build hooks, it doesn't work on an "ajax" load (example : load of new topics in infinite scroll). (?)
I hope my filter:topics.get hook to parse topic titles doesn't lead to unforeseen things by me...
That should be fine, but keep in mind
filter:topics.getisn't called when you load a topic page. So you might need to use both
filter:topic.build(for the topic page) and
filter:topics.get(for pages which show a list of topics)
@baris Yes. I see also that there is a problem for some other pages like /search ... I will see if I can get it work for all (I thought there were just one place/hook to parse title for all uses but it's not the case).