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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Thox’s picture

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?

Bèr Kessels’s picture

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

Thox’s picture

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

+1

robertDouglass’s picture

Assigned: Unassigned » robertDouglass
Status: Needs review » Reviewed & tested by the community
FileSize
3.16 KB

Updated so that it still applies.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks. Please update the theme migration documentation. Thanks.

robertDouglass’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
1.54 KB

The change to phptemplate.engine didn't get made.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)