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());
}
I also have a problem with the Taxonomy Menu module. I was trying to associate a menu to a taxonomy using the taxonomy menu, and it doesn't work. I thought it was a problem with the website I'm...
I was gonna say I'll go off and try them options but the simple link looks like the easiest as it took seconds to implement!
Didn't really want to manage outside of BD as that requires...
You could have a simple link using this:
Or you could make the Content: Nid field link to the content.
Give it a meaningful label and you don't need the title field in the View. ...
Posted10 hours 24 min ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Hi
I just want a simple unique automatic title for each item.
https://www.egtsc.co.uk/Annual%20Prizes
but without the nid column (or with if that solves the problem) but I...
Hi Mike. Glad your website is going well. The field you've labelled ID is the Title so you will need to put something in there.
The node ID isn't assigned until the node is created so...
Posted10 hours 39 min 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: