18F / web-design-standards-drupal

A Drupal base theme that uses the U.S. Web Design System. (ARCHIVED)
Other
46 stars 12 forks source link

[D7] Proper implementation of preprocess functions #58

Open jenter opened 8 years ago

jenter commented 8 years ago

@fureigh I am assuming that there is a need for a multitude of preprocess functions to match WDS scenarios. A majority of these could serve as placeholders which could roadmaps to missing gaps in markup, or at least namespacing better class names.

patrickcate commented 8 years ago

You might want to take a look at how the Omega Drupal 7 theme implements preprocess/process functions. They include some hooks that allow you to put these functions in their own directories and .inc files. For instance:

/preprocess/node.preprocess.inc
/preprocess/page.preprocess.inc
/preprocess/block.preprocess.inc
/process/block.process.inc
/process/page.process.inc

This makes it a lot easier to keep things organized.

fureigh commented 8 years ago

Thanks for the tip, @patrickcate!

brockfanning commented 7 years ago

I addressed this in #66. (by blatantly stealing from Omega...)