Forum
Welcome, Guest

Which file can I edit to format the v-card layout?
(1 viewing) (1) Guest
Ask all your version 2.0 questions here.
  • Page:
  • 1

TOPIC: Which file can I edit to format the v-card layout?

Which file can I edit to format the v-card layout? 1 year, 9 months ago #1454

  • rlarkins
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
I nearly have everything complete aesthetically but I'm not entirely happy with the v-card in terms of where the fields are showing in relation to each other.

For instance, I'd like to move the city, state and postcode inline without the line breaks.

I can see in the sobi2.vc.tmpl.php file where the line:
echo HTML_SOBI::customFieldsData($fieldsFormatted);>

calls the various $fieldsObjects into the v-card but I can't find the file or code that dictates the order to bring it in and where to insert line breaks, etc.

Can you steer me in the right direction? Appreciate it!
Last Edit: 1 year, 9 months ago by rlarkins.

Re:Which file can I edit to format the v-card layout? 1 year, 9 months ago #1455

  • nicholas
  • OFFLINE
  • Moderator
  • Developing for Joomla since it was born!
  • Posts: 1197
Sure.

There are different ways to approach this. If you want to keep the default call of just $fieldsFormatted, then you can go into the Custom Fields manager and set the order in which the fields are published. This should change the order in which they appear on the vCard. Also, in each field's attributes are options that control whether or not the label is shown, and whether or not to show a given filed on a new line. So, if your City and State are showing up on different lines, then it is probably because the field property is set to start the field on a new line.

Personally, as a designer, I never use this method. There simply isn't enough control over the fields. You can replace this call by individual calls to the fields and put them in exactly the layout that you like using CSS commands.

The commands are available here:
www.sigsiu.net/template_commands.html

My typical vCard set up is in the attached TXT file.

Notice that I have the "," in between field_city and field_federal_state? I don't know how to do that unless you do the individual field calls. I am using the formatted fields, but I have most of them set to not show on a separate line, which is why you see the break returns at the end of each line.

Hope this helps.

File Attachment:

File Name: vcard.txt
File Size: 954
Nicholas
CIO - CorFun, Inc.
Publisher - orthodoxbiz.com
Webmaster - Orthodox Christian Network
Last Edit: 1 year, 9 months ago by nicholas.

Re:Which file can I edit to format the v-card layout? 1 year, 9 months ago #1458

  • rlarkins
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
Quite coincidentally, that's exactly how I started doing it. Just gotta drop it all into a style div to match the rest and that should do it.

Thanks for your help.

Solved.
  • Page:
  • 1
Moderators: jasper, nicholas, henry, jerry
Time to create page: 0.62 seconds

Login