0

I have book node with assigned article nodes as child pages. On certain books I want to be able to use different theming. Using context I can print additional css class on book page according to taxonomy. Is it somehow possible that the class can be passed to all child pages as well? I can not figure out some easy solution. The only way I can think of would be to mark child nodes too. Any ideas? Thank you.

2 Answers 2

0

One easy way I can think of if it's only about CSS, you can use body tag classes, it has different classes based on the nodes.

1
  • Unfortunately, it is not of any use. There is no connection between parent book and it's childrens in body tag.
    – loparr
    Jun 12, 2013 at 21:25
0

You could do this in two ways :

  1. If you give each individual child nodes , individual class name.

  2. You could use the nth child property to the nodes in the CSS part.

    nth child property could be added as

    p:nth-child(2){
           background:#ff0000;
    }
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.