• Register or
  • Sign In
    • Forgot your password?
    • Forgot your username?
    Or sign in with your account on:
    Facebook
    Twitter
    Google
    LinkedIn

K2 | The powerful content extension for Joomla! developed by JoomlaWorks

  • home
  • about
  • blog
  • documentation
  • extend K2
  • showcase
  • community
  • demo
Leverage the power of rich media publishing the easy way!
  • Index
  • Recent Topics
  • Search
Welcome, Guest

To post messages, you need to login first.
K2 Community Forum
K2 Community Forum
New to K2? Ask here first!

2 columns for extra fields
(1 viewing) (1) Guest
Reply Topic
New Topic
  • Page:
  • 1

TOPIC: 2 columns for extra fields

2 columns for extra fields 10 months, 3 weeks ago #126724

  • Eduardo
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 37
Hello all !

If you could help me with this problem I'd be really grateful.

As the title says, I want to show the extra fields of an item with 2 columns as opposed to the default one. This is probably very simple, but for a non-coder, how should I do this?

Thanks for your time.
Reply Quote

Re: 2 columns for extra fields 10 months, 2 weeks ago #126725

  • William White
  • ( Moderator )
  • OFFLINE
  • Moderator
  • Posts: 3551
If you are working in the item view, you probably would go to the section where extra fields are displayed
(search for <!-- Item extra fields -->
and inside the foreach loop add the table rows and table columns to be generated as k2 loops thru the extra fields
If you are working in the category view edit category_item.php where there is a similar foreach loop
ALL of this would best be done in a K2 template (override)
See documentation - tips at the top for info on this
There is also a very good tutorial at OsTraining.com for K2 templating
For better answers, please include urls to your live site.
williamwhitejr.com/index.php/k2-support/...it-a-support-request
Reply Quote

Re: 2 columns for extra fields 10 months, 2 weeks ago #126727

  • Eduardo
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 37
Hi William thanks.

I'm using Joomla 2.5.4 and K2 2.5.7

My site is in beta at : www.sipi.com.sv/index.php/es/component/k...f%C3%A9-el-arco.html

If you check out that article, the extra fields appear where it says: Informacion Adicional
Essentially, I would like that list of 13 fields broken up into 7 on the left, 6 on the left, thus 2 columns.
Reply Quote

Re: 2 columns for extra fields 1 month, 2 weeks ago #171487

  • Luciano
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Hello Mr. William, thank you for your support, but after some attempts I failed to get this work, all I get is a single column with duplicate data from extra fileds (2x same data).

Can you please help me to code this table? looks easy but not for me since I'm not a coder/programmer..

thank you very much!

<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>

<?php endif; ?>

<?php endforeach; ?>
Reply Quote

Re: 2 columns for extra fields 1 month ago #172047

  • Micha
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
Allready got an answer on this one?
I also need 2 columns on the extra fields.

Anybody?
Reply Quote
Reply Topic
New Topic
  • Page:
  • 1
K2 Community Forum
K2 Community Forum
New to K2? Ask here first!
Find this topic helpful? Why not share it with others?
Tweet
Powered by Kunena
Time to create page: 0.20 seconds
Advertisement
  • Contact us
  • Join the K2 Expert Companies list
  • Privacy Policy
back to top
Copyright © 2006 - 2013 JoomlaWorks Ltd.. All rights reserved. K2 is a joint project by JoomlaWorks Ltd. & Nuevvo Webware Ltd., released under the GNU/GPL v2 license.
Joomla! is a registered trademark of Open Source Matters, Inc. JoomlaWorks/Nuevvo are not affiliated with or endorsed by Open Source Matters or the Joomla! Project.
designed by Nuevvo