This is very similar to this, hopefully its different enough to warrant its own question: How to display a field before node title?.
On our Drupal sites we have a dozen content types, many of which have custom node templates to control how they are rendered. We like this setup because our design/web production team can edit the template files easily but not more heavy drupal code.
However, we currently have only 1 page.tpl.php (we have a custom theme loosely based on bartik). In this template, we have ugly if-statements to make the page print different things based on the content type. Unfortunately, as the number of nodes increases this page.tpl.php is becoming unwieldy. The problem is that each node usually has different fields printed above and below the title, and usually modifies the ID of the title attribute.
What are the alternatives to adding more IF-statements into the page.tpl.php?
- Move the printing of the title (and content above and below the title) down into each node.tpl.php
- Modify the way that we are adding content above and below the title to use the existing title_prefix and title_suffix arrays
If we switch to render arrays method, I worry that coming up with the ordering and formatting of the content above and below the title will become more difficult for non-coders.