Hey folks, I'm working on a module which wants to squash a lot of things in page.tpl.php, e.g., the Edit / View / Outline / Etc tabs, the links at the bottom, the help button; and it wants to override the way breadcrumbs and title are handled. The only way I've found to do this is to adjust page.tpl.php and node.tpl.php with some logic like (if $node->type == 'mymodule'). However, this strikes me as not the best way (in the long haul) to do things, since it would require shipping a page.tpl.php file with the module for other people to use, or including a patch for the tpl.php files in the INSTALL.txt file, both of which seem like bad solutions. Is there a way for a module to overwrite tpl.php things without recourse to having people installing the module to edit their theme files? Peter -- Hartman's Brain Consulting | Openflows Networks Ltd. gpg 1024D/ED6EF59B (7D1A 522F D08E 30F6 FA42 B269 B860 352B ED6E F59B) gpg --keyserver pgp.mit.edu --recv-keys ED6EF59B
Peter Hartman wrote:
Hey folks,
I'm working on a module which wants to squash a lot of things in page.tpl.php, e.g., the Edit / View / Outline / Etc tabs, the links at the bottom, the help button; and it wants to override the way breadcrumbs and title are handled. The only way I've found to do this is to adjust page.tpl.php and node.tpl.php with some logic like (if $node->type == 'mymodule'). However, this strikes me as not the best way (in the long haul) to do things, since it would require shipping a page.tpl.php file with the module for other people to use, or including a patch for the tpl.php files in the INSTALL.txt file, both of which seem like bad solutions.
Is there a way for a module to overwrite tpl.php things without recourse to having people installing the module to edit their theme files?
It sounds to me like you're really developing a theme more than a module. Unfortunately, themes are at a level that modules can't really do anything about.
Peter Hartman wrote:
Hey folks,
I'm working on a module which wants to squash a lot of things in page.tpl.php, e.g., the Edit / View / Outline / Etc tabs, the links at the bottom, the help button; and it wants to override the way breadcrumbs and title are handled.
By handled do you mean displayed? Well, modules and themes work on different levels - seperating logic from presentation (separating how you get the content from how you display the content). Your module can clobber or change what is in the breadcrumb trail - or add access rules to determine if tabs show up - or add additional tabs - but how all that is displayed to the user is ultimately up to the theme developer. andre ___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
participants (3)
-
andre -
Earl Miles -
Peter Hartman