Is it possible to know inside of baseof.html what section or layout or template we are in? In this specific case I want to add classes to the body-tag identifying the section, taxonomy, “whatever” we are in (eg. section-archive, section-posts, section-contact).
You cannot access “the template name” from the template itself. But there are lots of page variables that may be of help (Type, Section, Layout (if set) …, Kind etc.) that can be used to build CSS classes.