Closed (fixed)
Project:
Omega
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2013 at 04:30 UTC
Updated:
10 Feb 2013 at 14:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
fubhy commentedYes, this is by design... Templates are overridden by templates, theme functions are overridden by templates... Do you have a good reason for why you need to be able to override the template with a theme function? If so, feel free to turn this into a feature request. Because this is absolutely possible with a few changes in the logic.
Comment #2
fubhy commentedOh damnit, I missed a fundamental point there...
So with native Drupal it's possible to override templates with theme functions. Right... So we have to support that too. I am sorry, I didn't even know that... I am such a dummy sometimes :)
Comment #3
milesw commentedGreat, thanks for the clarification.
The reason I'm overriding with a theme function is to render search results with a view mode instead of a template.
Comment #4
fubhy commentedI just committed the attached patch ... It fixes your problem and one other thing that I didn't consider when writing that lookup logic. It should now fully respect the theme trail and allow overrides of any sort (theme function overrides template file, template file overrides theme function) purely based on the weight of the theme in the theme trail of the current active theme (subtheme always overrides base theme / module... regardless of the type of the override [theme function vs. template file]).
This is the commit: http://drupalcode.org/project/omega.git/commit/2fd071a
Comment #5
fubhy commentedThis is the patch.... Forgot to upload it :)
Comment #6
milesw commentedWow, thank you. I can confirm this does indeed solve my issue. :)
Comment #7.0
(not verified) commentedUpdated issue summary.