Can you explain a bit more in detail what you are trying to do? When you say body, do you mean the body HTML tag? And what do you mean by a "URL alias"? Do you mean adding a string to the css class, taken from the alias being currently used by the page?
Typically, these types of things can be done by overriding the templates being used. In this case, the template page.tpl.php is the one in charge for rendering the html, head and body tags. This is different from D7.
In Backdrop the templates are also in core. The Page template file is at core/modules/system/templates/page.tpl.php. A good way to find other templates is the 'theme debug mode' which shows the templates used by the current page as comments in the HTML code. One way to enable the theme debug mode is to use the Devel module.
Another place to add a CSS class to the <body> tag which is based on the path alias of the current page, is the template.php file of your (custom) theme. The following code works for me:
function MYTHEME_preprocess_page(&$variables) {
// Add a body class with the path alias.
$variables['classes'][] = 'path-' . backdrop_clean_css_identifier(backdrop_get_path_alias());
}
Thanks. openid_connect is actually a different beast than OpenID. I think the "connect" version implements an OpenID client to work on an Oauth server. Or something like that.
I think this alternative works too. Instead of installing the stub modules, you may be able to just insert the relevant records in the systems table (while also ensuring entity_plus and...
This relates to a problem with creating a View of Projects on a site using MySQL >= 8.0.3
https://github.com/backdrop/backdrop-issues/issues/5795
I can't be at the meeting this...
Posted18 hours 57 min ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Additionally, "outside" means a file that is located outside a module folder. The second parameter of module_load_include() is the name of a module, so, this function assumes that you are loading a...
Posted23 hours 41 min ago by Alejandro Cremaschi (argiepiano) on:
Yes, it does mean outside your functions. You can use module_load_include() within functions but not outside.
The YouTube module gives an example:
<?php
/**
* @file
* Youtube field module adds...
Posted1 day 4 hours ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Comments
Can you explain a bit more in detail what you are trying to do? When you say body, do you mean the body HTML tag? And what do you mean by a "URL alias"? Do you mean adding a string to the css class, taken from the alias being currently used by the page?
Typically, these types of things can be done by overriding the templates being used. In this case, the template page.tpl.php is the one in charge for rendering the html, head and body tags. This is different from D7.
That's exactly what I mean. D6 used to have the base templates in core, where can I find them in BD to copy?
In Backdrop the templates are also in core. The Page template file is at core/modules/system/templates/page.tpl.php. A good way to find other templates is the 'theme debug mode' which shows the templates used by the current page as comments in the HTML code. One way to enable the theme debug mode is to use the Devel module.
Another place to add a CSS class to the <body> tag which is based on the path alias of the current page, is the template.php file of your (custom) theme. The following code works for me: