Hi @leeksoup.
First, keep in mind that, if not done well, this is a big security risk, as someone could insert malicious tags in titles (unless the function you refer to takes care of sanitizing and filtering those).
In Backdrop, page titles are handled by the layout and block systems. You can choose to insert "Page title combo" blocks in your default (or any other specific) layout, and the block system will take care of rendering the page title (and tabs, etc).
While I've never tinkered with this, looking at the code for that block, the theming of the "Page title combo" output is done in page-components.tpl.php
(which is located under core/modules/system/templates) so you can override that tpl file in your front theme and insert your function somewhere there before the title is output. Just be sure the layout uses that combo block.
EDIT:
Another way to do that (which may be better in terms of coding) is to create another template preprocess function and take care of calling your function there and sending the correctly formatted title to the template file. For example, you can create a function called MY_THEME_preprocess_page_components(&variables) {}
in your front theme's template.php file. Take a look at system_preprocess_page_components()
Hi @leeksoup.
First, keep in mind that, if not done well, this is a big security risk, as someone could insert malicious tags in titles (unless the function you refer to takes care of sanitizing and filtering those).
In Backdrop, page titles are handled by the layout and block systems. You can choose to insert "Page title combo" blocks in your default (or any other specific) layout, and the block system will take care of rendering the page title (and tabs, etc).
While I've never tinkered with this, looking at the code for that block, the theming of the "Page title combo" output is done in
page-components.tpl.php
(which is located under core/modules/system/templates) so you can override that tpl file in your front theme and insert your function somewhere there before the title is output. Just be sure the layout uses that combo block.EDIT:
Another way to do that (which may be better in terms of coding) is to create another template preprocess function and take care of calling your function there and sending the correctly formatted title to the template file. For example, you can create a function called
MY_THEME_preprocess_page_components(&variables) {}
in your front theme's template.php file. Take a look atsystem_preprocess_page_components()