[drupal-devel] [feature] Centralize print theme page

stefan nagtegaal drupal-devel at drupal.org
Wed Apr 20 16:40:09 UTC 2005


Issue status update for http://drupal.org/node/20910

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     feature requests
 Priority:     normal
 Assigned to:  chx
 Reported by:  chx
 Updated by:   stefan nagtegaal
 Status:       patch

I like this! Very nice and very clean patch... +1 from me either...




stefan nagtegaal



Previous comments:
------------------------------------------------------------------------

April 20, 2005 - 14:58 : chx

Attachment: http://drupal.org/files/issues/output.patch (1.27 KB)

The patch is very simple but opens a lot of possibilites. Like you can
put the output of any Drupal function into a block. Another step
towards multi region pages.


This patch does not even break backwards compatibility: if you do not
want to print anything or want to handle your output, fine, return
nothing from the callback as you do now. However, you do not need to
write print theme('page', ...); anymore, just return it, Drupal will
theme it for you.


I'm posting two patches. The first is the very simple, functional one.


The second, however is just the result of a preg change.




------------------------------------------------------------------------

April 20, 2005 - 15:46 : chx

Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB)

here comes the dull megapatch. Note: contact.module had a bug, it called
theme_page with two parameters.




------------------------------------------------------------------------

April 20, 2005 - 15:59 : adrian

I'm gonna put a definate +1 for this.


Even just for consistency sake, it's a wonderful patch.




------------------------------------------------------------------------

April 20, 2005 - 16:07 : chx

Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes)

Removed four instances of return; preceded by a return $output.




------------------------------------------------------------------------

April 20, 2005 - 16:07 : chx

Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB)

0 bytes? reattach.




------------------------------------------------------------------------

April 20, 2005 - 16:56 : dikini

+1 makes it easier to understand what is going on




------------------------------------------------------------------------

April 20, 2005 - 17:56 : moshe weitzman

+1. makes it easier to reuse the output of functions. The print
statement at the end of many callback functions hinders reuse.







More information about the drupal-devel mailing list