A few small changes are suggested for the template files:
- To avoid unnecessary errors when E_ALL is set higher, instead of doing
if ($var):it should beif (!empty($var)): - For template files it is cleaner to use
if (): endif;and
foreach (): endforeach;instead of
if () { }and
foreach () { } - Because all fields can be enabled / disabled at will via the field settings, all fields should be optional, inc $map_link.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | location-n896366-2.patch | 4.65 KB | damienmckenna |
| #1 | location-n896366.patch | 4.65 KB | damienmckenna |
Comments
Comment #1
damienmckennaHere's a patch that cleans up the tpl files a little bit.
Comment #2
damienmckennaSlight correction.
This patch sponsored by Bluespark Labs.
Comment #3
rooby commentedThanks for the patch.
Committed with a few minor additions:
* A couple of indenting and spacing changes.
* A slight change also to location_distance.tpl.php
* Change to use format_plural in locations.tpl.php
* Changed a couple of extra echos to prints so they are now all consistent.
* A fix for the following code in the patch from #2:
Province and post code would not display if city was not present.
http://drupal.org/cvs?commit=476314
http://drupal.org/cvs?commit=476310
http://drupal.org/cvs?commit=476312
Powered by Dreditor.
Comment #4
rooby commentedMarked #785208: Fix indenting of template files as duplicate of this issue.
Comment #5
damienmckennaThanks Rooby.
Comment #6
rooby commentedNo worries.
Also committed to DRUPAL-7--3.
http://drupal.org/cvs?commit=478412