VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: ciar4n on December 07, 2011, 16:23:37 PM

Title: Editing product-field-display output in overrides
Post by: ciar4n on December 07, 2011, 16:23:37 PM
Just wondering is there any way of putting a line break in between custom field items in the profuctdetails overrides..

<span class="product-field-display"><?php echo $field->display ?></span> ...

At the moment they just appear as <input><label><input><label><input><label><input><label> etc.. which leaves them on top of each other and quite difficult to style

Be great if I could output them as <input><label><br><input><label><br><input><label><br> whcih would at least give them their own line.

Any help would be appreciated.

Thanks in advance
Title: Re: Editing product-field-display output in overrides
Post by: PRO on December 07, 2011, 17:18:47 PM
.product-field-display{width:100%}

ALSO, MINE ARE on top of eachother.


see image

OR, do you mean the Title then </br> ?

[attachment cleanup by admin]
Title: Re: Editing product-field-display output in overrides
Post by: ciar4n on December 07, 2011, 18:12:04 PM
Thank you BT..

This is what I have so far... I've marked in red the items i'd like to split with a <br> (the radio buttons)

Idealy if I could break them up into divs or list items it would be great but even a <br> would get me by.

[attachment cleanup by admin]
Title: Re: Editing product-field-display output in overrides
Post by: PRO on December 07, 2011, 18:58:49 PM
this thread will help a little.
http://forum.virtuemart.net/index.php?topic=92777.0

ITS not exactly it, but will show you some ways.

You can do it all with css,
or if you have to you can do a strip and replace with php.

Title: Re: Editing product-field-display output in overrides
Post by: ciar4n on December 07, 2011, 19:34:10 PM
Perfect BT... thank you!!!

Got by using CSS alone as you described in that thread.

I was able to get the attached layout with the following CSS

.product-field label {width: 38%; float: left; line-height:10px;}
.product-field input {width: 6%; float: left; margin:5px;}

[attachment cleanup by admin]