Keyword

extra fields allignment

  • Pantelis
  • Pantelis's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #144474 by Pantelis
extra fields allignment was created by Pantelis
Hello
I want to ask how can i make the extra fields at an item to be at the right side of the image.I managed to make the image float left but i cannot make the extra fields be at the right side of the image.See the screenshot.
Thank you in advance

imgur.com/UCExzLQ

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #144484 by Krikor Boghossian
Replied by Krikor Boghossian on topic extra fields allignment
First of all make sure that you are using overrides instead of editing core files: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Then open the item.php and locate the extrafields block from the HTML comments.
<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
	  <!-- Item extra fields -->
	  <div class="itemExtraFields">
	  	<h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
	  	<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="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; ?>
			</ul>
	    <div class="clr"></div>
	  </div>
	  <?php endif; ?>

And then move it directly after the image element

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Pantelis
  • Pantelis's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #144495 by Pantelis
Replied by Pantelis on topic extra fields allignment
Thank you very much .It worked but now i want the lines and the background of the extra fields not to mess up with the image.Any idea?
Please see the screenshot. the red box.
Thank you in advance

imgur.com/vTg3r2C

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #144513 by Krikor Boghossian
Replied by Krikor Boghossian on topic extra fields allignment
You can add a right margin to the image, or even better overflow: hidden and a left margin/ padding to .itemExtraFields

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Pantelis
  • Pantelis's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #144525 by Pantelis
Replied by Pantelis on topic extra fields allignment
Thank you very much for the solution.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #144527 by Krikor Boghossian
Replied by Krikor Boghossian on topic extra fields allignment
You 're welcome Pantelis :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum