I have a case where I need the field value to be displayed to the left of the label when viewing the node. I have tried all kinds of CSS magic, but not succeeded. Does anyone have any idea?
I've done float and negative margin offsets, but the most reliable is a custom template. Create your own labels and place the value.
form, webform, or ?
On 7/25/2014 5:19 PM, Nancy Wichmann wrote:
I have a case where I need the field value to be displayed to the left of the label when viewing the node. I have tried all kinds of CSS magic, but not succeeded. Does anyone have any idea?
Thanks, Don. This is just a standard node display. I'm not crazy about the template idea because this customer is in the habit of changing labels without notice.
From:Don donald@fane.com
I've done float and negative margin offsets, but the most reliable is a custom template. Create your own labels and place the value.
form, webform, or ?
Fun. I've gone the css route before, but it's not always reliable across browsers.
Good luck. If you want to send me a link i can play with firebug and get more precise.
-Don-
On 7/25/2014 6:20 PM, Nancy Wichmann wrote:
Thanks, Don. This is just a standard node display. I'm not crazy about the template idea because this customer is in the habit of changing labels without notice.
From:*Don donald@fane.com
I've done float and negative margin offsets, but the most reliable is a custom template. Create your own labels and place the value. form, webform, or ?
Have you thought of a node preprocess function that creates a variable with the formatted label and output, and then just use that in your node template? Granted, it requires an override of the node template in your theme, but this would be a one time change that would allow the user to change the content to their heart's content without requiring any changes from you.
Steve
On Jul 25, 2014, at 3:51 PM, Don donald@fane.com wrote:
Fun. I've gone the css route before, but it's not always reliable across browsers.
Good luck. If you want to send me a link i can play with firebug and get more precise.
-Don-
On 7/25/2014 6:20 PM, Nancy Wichmann wrote:
Thanks, Don. This is just a standard node display. I'm not crazy about the template idea because this customer is in the habit of changing labels without notice.
From: Don donald@fane.com
I've done float and negative margin offsets, but the most reliable is a custom template. Create your own labels and place the value.
form, webform, or ?
--
-- -Don Pickerel- Fane Software
<Fane-th.png>
[ Drupal support list | http://lists.drupal.org/ ]
Thanks all. I ended up doing a preprocess_field() together with a custom field--list-boolean.tpl.php. It looks good now.
From: Steve Edwards killshot91@gmail.com
Have you thought of a node preprocess function that creates a variable with the formatted label and output, and then just use that in your node template? Granted, it requires an override of the node template in your theme, but this would be a one time change that would allow the user to change the content to their heart's content without requiring any changes from you.
Just my $0.02
If the label is changed often, it's actually not a label, but a field. Why not add a "label field" and just concatenate with the value? This removes some code and gives the end user a cleaner interface to change things.
Bert
On 26/07/14 05:08, Nancy Wichmann wrote:
Thanks all. I ended up doing a preprocess_field() together with a custom field--list-boolean.tpl.php. It looks good now.
------------------------------------------------------------------------ *From:* Steve Edwards <killshot91@gmail.com> ** Have you thought of a node preprocess function that creates a variable with the formatted label and output, and then just use that in your node template? Granted, it requires an override of the node template in your theme, but this would be a one time change that would allow the user to change the content to their heart's content without requiring any changes from you.