My website has two distinct sections ("cars" and "bikes"), so I have made CarsHolder and BikesHolder page types with corresponding children. Each section has a different image. However, for pages which can't be CarsArticle or BikesArticle (ie User Defined Forms), I could do with some code to go onto Page.ss which will automatically select the correct image based upon the Parent page type.
ie: A User Defined Form with "CarsHolder" as it's parent will load an image of the car for its header.
I had hoped that something along the lines of the code below would work, but I don't know the correct code:
<% if $Parent = CarsHolder %> <div id="carsheaderpic">Cars</div> <% else %> <div id="bikesheaderpic">Bikes</div> <% end_if %>
Any pointers greatly appreciated :)