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());
}
Update: I tried to use Leaflet and Geofield with Geocoder, but can't get geocoding from other field working at all. But at no point the map breaks. It just stays empty.
Is there really,...
To me this clearly looks like some wrong use of the Leaflet library at some point.
But the problem is not the empty map (alone), which works fine and never caused me trouble. Something...
Clearing the cache was one of the things I tried. This included truncating the cache tables that don't get cleared by the flush all caches button, as well as sessions and tempstore tables. This...
So tried accessing the updates.backdropcms.org server again and tech support said:
Hello,
It looks like outside of the server that host isnt accessible currently --
jeremy_a@khsupport...
It was the ProtectHome setting in the apache service which was the problem.
I did this:
systemctl edit apache2.service
Then added this:
[Service]
ProtectHome=no...
Posted2 days 11 hours ago by Francis Greaves (themetman) 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: