Keyword

K2 extra field alignment..

  • Bojan Krlovic
  • Bojan Krlovic's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #95971 by Bojan Krlovic
K2 extra field alignment.. was created by Bojan Krlovic
Hi there k2 community..

 

I have a little problem (little, I think)

 

I want to put extra fields next to the item picture.. (in item view).. how to set that? i dont know the code.. I need step by step how to put code... and what code.. Soo.. help please! :)

Here's the picture..
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #95972 by GoDHanD
Replied by GoDHanD on topic K2 extra field alignment..
Please check under Simon Says K2 tips & tricks that's how I moved mine around & so far it's working well.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago - 11 years 10 months ago #95973 by burnyourears
Replied by burnyourears on topic Re: K2 extra field alignment..
Hi - I have exactly the same question - just want to place the extra fields NEXT to the Image, like in the image of the poster above. I know I have to change the code in item.php and category_item.php. Can anyone tell me what I have to do?

This is how it looks like now:
<?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
          <!-- Item Image -->
          <div class="catItemImageBlock">
                  <span class="catItemImage">
                    <a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
                        <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
                    </a>
                  </span>
                  <div class="clr"></div>
          </div>
          <?php endif; ?>

          <?php if($this->item->params->get('catItemIntroText')): ?>
          <!-- Item introtext -->
          <div class="catItemIntroText">
                <?php echo $this->item->introtext; ?>
          </div>
          <?php endif; ?>

                <div class="clr"></div>

          <?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
          <!-- Item extra fields -->
          <div class="catItemExtraFields">
                <h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
                <ul>
                        <?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="catItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
                                <?php else: ?>
                                <span class="catItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
                                <span class="catItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
                                <?php endif; ?>
                        </li>
                        <?php endif; ?>
                        <?php endforeach; ?>
                        </ul>
            <div class="clr"></div>
          </div>
          <?php endif; ?>

Thank you so much!

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #95974 by william white
Replied by william white on topic Re: K2 extra field alignment..
Try moving the block of code that displays xtra fields into the div that contains the image and float the image left with css

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #95975 by burnyourears
Replied by burnyourears on topic Re: K2 extra field alignment..
Thank you very much - so great, it works! :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum