Targeted CSS Selectors
Many things can be customized very precisely by the use of smart CSS selectors.
To that extent you can leverage the CSS classes that b2evolution adds to the
For example the homepage may have:
But if you go to a specific article page, you may have:
disp_front changed to
disp_single : you can use that to have specific CSS styles for article pages.
Also not that
item_none changed to
item_49 : you can use that if you need specific CSS styles for the article with ID 49.
Now if the same page is viewed bu a logged in user you may have:
anonymous changed to
loggedin. We also know the User Group go the logged in User:
Considerations about Page Caching
When Page Caching is on, you will get a
page_cached class. Otherwise you will get
Note that when a User is logged in, the page will never be cached to prevent leaks of personal information.
Also note that when a page is cached (on the server), it is not safe to consider it will always be viewed by the same browser / device. Therefore in that case you will always have
unknown_device. If you need to customize CSS based on the device type for anonymous users, we recumbent you use CSS Media Queries.
Created by • Last edit by on Apr 10, 2015
No feedback yet
Form is loading...