Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Views 6.x-3.0 has a check box on the field configuration page labeled:
Place a colon after the label
If the label is to be inline with the value, place a colon between them. Not valid for styles such as table where the label is not placed with the value.
Semantic views does not respect this option and the colon is displayed regardless of the setting.
Workaround is to rewrite output.
Comment | File | Size | Author |
---|---|---|---|
#7 | semantic_views_does_not-1438724-7.patch | 622 bytes | immoreel |
#5 | colon.patch | 780 bytes | Martijn de Wit |
Comments
Comment #1
drupal_was_my_past CreditAttribution: drupal_was_my_past commentedThis is also true for 7.x-1.x-dev version. semanticviews-view-fields.tpl.php shouldn't have the colon hardcoded in, but should respect the Views "Place a colon after the label" setting under "Create a label".
Comment #2
jiddisch CreditAttribution: jiddisch commentedHow can I remove the colon without jQuery?
Edited:
My solution was to copy semanticviews-view-fields.tpl.php from the module folder to my theme folder, and removed the colon from line 41.
Comment #3
RogerRogers CreditAttribution: RogerRogers commented#2 is a good temporary work-around.
Comment #4
Martijn de Witit also applies to version 7.x
my solution:
Make a copy of semanticviews-view-fields.tpl.php and replace a code line
replace:
<?php print $field->label; ?>:
with this:
<?php print $field->label; ?><?php if ($field->handler->options['element_label_colon']): ?>:<?php endif; ?>
Comment #5
Martijn de Witpatch for 7.X branch
Comment #6
Martijn de WitComment #7
immoreel CreditAttribution: immoreel as a volunteer commentedHey Hi,
I made a new patch, the one from Martijn de Wit wasn't relative to the module folder
Comment #8
Martijn de Wit@immoreel thnx! Sorry didn't notice it :)
Comment #10
Scyther CreditAttribution: Scyther commentedFixed for 7.x-1.x version. Still need fix for 6.x-1.x
Comment #11
Scyther CreditAttribution: Scyther commentedFixed in D6 version also