Closed (fixed)
Project:
Semantic CCK
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
23 Jun 2010 at 21:25 UTC
Updated:
25 May 2012 at 23:12 UTC
I would like to propose a new feature for this modules.
Could be useful to have possibility to add a "Suffix and Prefix" (to use as a separators) after and before the content only in the situation when a single value is returned for a field.
An idea to avoid all workarounds that suggest to create a wrapper!
Thanks!
Comments
Comment #1
rjay commentedI discussed this with my colleagues and we're having a hard time thinking of cases where this would actually be useful. Did you have a specific scenario in mind where you would use this feature?
Ryan
Comment #2
Dret commentedAn integration for prefix and suffix in Semantic CCK will give the possibilities to move graphic separators, as (|) or (-), out of the field itself.
Example, an horizontal list of different fields, like:
09/09/2010 - London - Piccadilly Circus - 11:30 am
(composed by a Date filed + Text field + Text field + Date Field)
I can Give a specific markup to each field with Semantic CCK to build an unordered list or better a definition list. But I cannot insert in clean way "separators" between each fields.
Bye!
Comment #3
henrijs.seso commentedThis could be cool, I am now struggling with this. You could make it in content-field-FIELD_NAME.tpl.php but its hard to keep track of those :) So here is case - address.
Fields are:
label
street
building
premise
city
postal code
country
In form they have labels but in display, labels suck. So here is how Prefix and Suffix would kick ass...
Comment #4
James-TRMS commentedYes, this would help me create a far more elegant and respectable end product where my display outputs several fields inline to read as a sentence. The ability to add commas and a finishing full stop would add significantly to the readability and quality of presentation.
The markup module allows this to some extent and, while brilliant elsewhere, is a really hacky solution as far as this problem is concerned and would require repeating over thirty times in my current form.
To be honest imho this would be best off as a feature of the cck text field itself, as it is with the integer field, but failing that, and with possible other benefits, it would be useful here, single or multiple fields.
Comment #5
rjay commentedI have added the ability to specify a prefix and suffix for a field. This feature can be used with single and multiple value fields.
This feature is included in version 6.x-1.4.
Comment #7
doublejosh commentedOMG, perfect. Thank you! This is actually filling a bit of a hole in Drupal CCK output. IMHO
Been fighting with this same issue for some time now too. I can't / don't want to use the various other options...
All I need to do is add a configurable CCK field description to the display output below a multi-value field.
This should actually be rather simple, and the best above option was a "code field" within display suite.
Comment #8
iantresman commentedI think the Form Markup module may also help here