Preprocessor
Categories
Component ID
1253382
Component name
Preprocessor
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
The purpose of this module is to provide a simple way for non-tech-saavy users to easily process content in commonly needed ways, including:
- Preprocessing Blocks
- Adding first and last classes
- Adding the block's source module and delta as classes
- Adding simple 'configure,' 'edit block,' and 'edit menu' buttons on block hover
- Integrating with common block modules, such as: Menu Block, Nice Menus, Menu Admin Per Menu, Skinr, etc.
- Preprocessing Pages
- Adding classes to reflect front page, is_admin, content type, node id, etc.
- Adding classes based on URL arguments
- Adding classes for current user's role
- Adding classes based on current user's browser client
- Adding classes based on current page's taxonomy terms
- Adding new template suggestions for content types like Panels (considering a separate ui for adding new suggestions)
- Preprocessing nodes
- Adding classes based on node variables such as published, sticky, teaser, ownership
- Adding classes based on current user's access to current node. E.g., user-node-update, user-node-delete, etc.
- Preprocessing Comments
- Adding classes based on comment variables such as published, ownership, first and last, zebra striping,
- Preprocessing Menu Items
- Adding classes based on menu link variables such as expanded/collapsed, menu parent hierarchy, active trail
- Optionally permitting users to specify wrapping html elements and corresponding class
- Preprocessing Breadcrumbs
- Adding classes for first, last, and current breadcrumb
- Optionally permitting users to specify wrapping html elements and corresponding class for each breadcrumb
This project is currently a sandbox module. At the moment, I have a template.php file that accomplishes all of these tasks. I need to convert it into a module with a detailed settings page.
Please feel free to comment and make recommendations, or even just let me know if this is something that you think people would want!
