I place all my theming templates in a subfolder in my theme directory. It would be great if the code could search for the template in subdirectories in the theme folder.

Comments

jcnventura’s picture

Title: Theming template location » Search for template location in subdirectories
Status: Active » Postponed

Yes it would.. I will add this to the list of 'nice things to have'.

surgeonbor’s picture

This module really needs to use the core theming tools. It's more important than just "nice to have."

eugenmayer’s picture

Status: Postponed » Needs work

Guys stop claiming only - help implementing! Looking at the issue queue its just like "i want this - do it".

What about starting to help? This module is huge and actually needs some polishing or even more, but with this size .. its not capable to do be done alone.

eugenmayer’s picture

Title: Search for template location in subdirectories » Use theme template folder (nodes) to search for templates
Version: 6.x-1.7 » 6.x-1.10
Status: Needs work » Needs review
StatusFileSize
new1.25 KB

Attached a patch. Actually halfs the size of the code needed for scanning the patchs while adding full theme-api support. That means nodes are searched in every registered template path, that means in the current theme, then subtheme and every module using the theme_regestry to place its folder for scanning ( usual approach for modules to get involved with templates ).

eugenmayer’s picture

StatusFileSize
new1.25 KB

Well that last patch was garbage..i must be sleeping sorry

dawehner’s picture

+++ print.pages.inc
@@ -481,17 +481,21 @@ function _print_get_template($format = NULL, $type = NULL) {
+  foreach ($filenames as $value) {    ¶

Could we rename $value to $filename? This makes more sense for me.

+++ print.pages.inc
@@ -481,17 +481,21 @@ function _print_get_template($format = NULL, $type = NULL) {
+    $paths[] = drupal_get_path('module', 'print');

we still call this function multiple times. its still not needed. yes this was in before, but why not fix it now.

+++ print.pages.inc
@@ -481,17 +481,21 @@ function _print_get_template($format = NULL, $type = NULL) {
+	return $file;

could you please remove the whitespace errors/tabs in the code. This would be cool

Powered by Dreditor.

eugenmayer’s picture

StatusFileSize
new1.25 KB

Damn. attached the wrong patch above..

eugenmayer’s picture

StatusFileSize
new1.32 KB

sorry...just too confused. Finally the patch with the ideas of daniel

eugenmayer’s picture

i implemented it from bottom up, this patch should not be needed if this gets used http://drupal.org/node/358838#comment-3052810

kitsol’s picture

Afflicted for my bad English, do I seek to make print the documents with the topic by defect but impossible and not easy to know or put the code above? In which repertory. Help me Thanksi

jcnventura’s picture

Status: Needs review » Closed (duplicate)