[drupal-devel] [bug] $teaser misnamed in themes (theme_node)

Thox drupal-devel at drupal.org
Thu Jul 14 10:52:57 UTC 2005


Issue status update for 
http://drupal.org/node/26637
Post a follow up: 
http://drupal.org/project/comments/add/26637

 Project:      Drupal
 Version:      cvs
 Component:    theme system
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  robertDouglass
 Updated by:   Thox
 Status:       patch

I must have been half asleep. It does make sense, and it is logical.


+1




Thox



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

July 13, 2005 - 18:46 : robertDouglass

Attachment: http://drupal.org/files/issues/main_teaser.patch.txt (3.1 KB)

The documentation to theme_node clearly says the the parameter $teaser
is "Whether to display the teaser only, as on the main page." Naming
this parameter $main in the themes is confusing. Main is used elsewhere
to mean "whether to show full view or teaser view", but the meaning of
$teaser seems to be subtly different. 


An alternate to the patch I'm suggesting would be to eliminate $teaser
altogether, system-wide. The variable $main makes it clear that it is
transmitting state (whether or not on the node's main page), whereas
the variable $teaser makes on think it is transmitting the actual
teaser.




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

July 13, 2005 - 23:41 : Thox

I don't follow your logic why $teaser needs to be renamed, especially if
$main is the alternative. If RSS wants to only show the teaser, does
$main=true make sense?




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

July 14, 2005 - 11:01 : Bèr Kessels

+1 from me. It removes another variable. and it increases the logic.
Instaed of using inversed logic, we now all use one single variable.







More information about the drupal-devel mailing list