Closed (fixed)
Project:
Location
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2007 at 19:06 UTC
Updated:
23 Mar 2008 at 07:32 UTC
I don't want the location block showing up in the teaser. This implements that. A better solution would be to make this configurable by content-type.
| Comment | File | Size | Author |
|---|---|---|---|
| no_teaser.patch | 348 bytes | binford2k |
Comments
Comment #1
2houseplague commentedThat works very nicely. Thanks. The location block is represented in CCK "Manage Fields" (with a weight of 9), but is not configurable in "Display Fields". I think the answer is that it should be.
Comment #2
smitty commentedThis works indeed! But wouldn’t it be preferable to do this in the theme function instead of the module? Then you can remove the teaser as well as make it look in another way, without having to change the core module. You even can include it in theme 1 and exclude it in theme 2.
In my opinion the right place for this change would be the function phptemplate_locations. To get this function copy the function theme_locations() from the location.theme into your template.php in the folder of your theme and add there the line 'if ($teaser) return $output;' before the if (count($locations)) statement.
The only problem is, that in this function the variable "$teaser" is not available. So my recommendation would be to enhance the functions theme_locations() and theme_location with the additional parameter "$teaser" to enable the separate theming of the teaser.
Or has someone a better suggestion, how to get access to the variable $teaser in the theme function?
Comment #3
crocodyl commentedNoob question: Where do I insert the code contained in this patch? I know it is in the location module directory, but from there I don't know where to put it. Also, is cutting and pasting the code into a file OK, or do I need to use the patch program from the command line. The command line is still a little bit of a hurdle for me.
Comment #4
smitty commentedYou'll find an overview about patches at: http://drupal.org/patch
Comment #5
bdragon commentedFixed at drupalcon.
Comment #6
bdragon commentedhttp://drupal.org/node/189942 and http://drupal.org/node/216500 marked dupe.
Comment #7
crocodyl commentedsubscribing
Comment #8
crocodyl commentedAlso, I haven't found a way to adjust the weight of the "Location(s)" in the display of the node. I am using CCK, and I can change the number of the weight, but it does not seem to actually move the "Location(s)" display in the published page.
Has this been changed in a more previous version of the module?
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.