I've created a custom module for organizing and publishing our newsletter content. This question, I think, is more a module dev question then a theming question (though they're closely related.)
The issue I'm running into is how to get each newsletter ready for being themed (from the module.)
At this point the URL structure of our newsletter will be /newsletters/{newsletter-name}/{edition-name}/{issue-date} which means that we can create template files in our theme using filenames like page-newsletters-{newsletter-name}-{edition-name}.tpl.php, which is great. The one issue I'm running into is that all of the content comes through in the $content variable of the theme.
I'd like to have it come through as different variables (so that I can, inside the theme, place certain content in certain areas.)
Is there a proper way for doing this?
Comments
preprocess
You can't readily break apart the $content variable. Not easily, at least. But you can do things like using CCK fields to hold discrete pieces of content data, and implementing a page preprocess function to generate variables that can be rendered in different places in your page templates.