I'm new to SilverStripe, but so far I like it very much. I now have a development problem which I don't know quite how to solve (unfortunately the SS documentation seems to be far from complete).
I have a site with six "sections" = six pages on Level 1 in the site structure. I want a distinct page head for each section, which would be inherited by the sub-pages of each respective section. For ease of maintenance I would like not having to create six different page types; I would rather have one page head which detects the section and replaces the shown contents accordingly.
I tried using $URLSegment as body id and showing only the correct head by means of css. This worked fine on the top level, but as each sub-page get their own url this solution was not practical. I have also tried experimenting with Level(1) etc. but found no workable solution.
Does anyone have a suggestion for a nice solution? I should also add that I am no programming genious -- I have dabbled in various simpler programming for a decade or two, but much of it is really over my head.