[development] Specifying .tpl.php file locations

Robert Holmes robbiethegeek at gmail.com
Tue Oct 5 15:34:13 UTC 2010


Check out http://drupal.org/node/190815

Robbie


On Oct 5, 2010, at 11:12 AM, Richard Morse wrote:

> Hi! This may be the wrong forum to ask this question; if so, please let me know where I should be directing this question.
> 
> I am developing a theme, and would like to use the system provided 'block.tpl.php' file for most blocks. However, for menu blocks I would like to use a different .tpl.php file. I can modify the 'template_files' array in theme_preprocess_block() to include the file, and the devel_themer module then shows the file name added to the list of possible suggestions, but unless I have a file called 'block.tpl.php' in my theme directory, it ignores the file I want it to use. This is sub-optimal because if there are any security changes made to 'block.tpl.php' in future Drupal 6 versions, the changes will not propagate.
> 
> Is there any way to do one of the following?
> 
> 1. in 'theme_preprocess_block' specify the path to a .tpl.php file to be used, so that I don't need to have a file named 'block.tpl.php' in my theme directory
> 
> or
> 
> 2. in the 'block.tpl.php' file, somehow tell Drupal to use the one provided by the system instead?
> 
> Also, is there some place I should be looking for documentation on how to do this? I've been through much of the Theming manual on drupal.org looking for this information already...
> 
> Thanks,
> Ricky
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20101005/7cf37081/attachment.html 


More information about the development mailing list