themosis / theme

The Themosis framework theme.
http://framework.themosis.com/
GNU General Public License v2.0
104 stars 35 forks source link

Conditional filter #21

Closed ribeiroevandro closed 7 years ago

ribeiroevandro commented 7 years ago

Not if I'm expressing myself correctly, but I need to apply a CSS class according to a specific page. In the documentation I did not find clear how to do this, is there a way to do this? For example, if it's page X include a CSS class?

jlambe commented 7 years ago

You can use the body_class() function. If you specified a layout view, call the function on the body tag like so:

<body {{ body_class() }}>

Or on a specific view/template. You can pass a string parameter to the function in order to add custom CSS classes.

ribeiroevandro commented 7 years ago

Thank you very much, I had not thought about this possibility.