M
M
magary42016-07-12 11:36:25
Drupal
magary4, 2016-07-12 11:36:25

What information about the page is useful to add to the body in the form of classes?

I remember when I worked with wordpress there was a useful feature that classes like page-id-18 page-alias-about-us were automatically added to the body element logined
now a custom project on
symphony I am writing a twig-helper to do this
I want to add route-name page- items id-18 page-alias-about-us logined advise what else is useful to add, for later simplification of styling

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Pavlov, 2016-07-12
@lexxpavlov

Don't pre-add, just in case. If you need it, then add it. Is it easy?..

M
Mr Crabbz, 2016-07-12
@Punkie

Add the page template slug. It will be convenient to edit css for specific templates.

A
afi13, 2016-07-12
@afi13

A bunch of classes that are not used is also not the best choice. Try to add as few classes as you really need.
PS And here Drupal?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question