Keyword

[SOLVED] individual position of extra fields in item.php

More
6 years 9 months ago - 6 years 9 months ago #162873 by alexandria
Replied by alexandria on topic individual position of extra fields in item.php
Hello,

And like this, do you see extrafields ?
<div> <?php echo '<h1>between here and </h1>'; ?> </div>
<div class="container">
	<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
	<div class="col-md-4 image">		
	<?php if(($extraField->name == 'image_left') &&( $extraField->value != '')): ?>		
	<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
	<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>					
	<span class="itemExtraFieldsValue"><?php echo $this->item->introtext; ?></span>
	<span class="itemExtraFieldsValue"><?php echo $this->item->fulltext; ?></span>
	<?php endif; ?>
	</div>
	<div class="clr"></div>		
	<div class="col-md-4 image">		
	<?php if(($extraField->name == 'image_middle') &&( $extraField->value != '')): ?>		
	<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
	<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
	<?php endif; ?>
	</div>
	<div class="col-md-4 image">		
	<?php if(($extraField->name == 'image_right') &&( $extraField->value != '')): ?>		
	<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
	<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
	<?php endif; ?>
	</div>					
	<?php endforeach; ?>	
</div>
Last edit: 6 years 9 months ago by alexandria.

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

  • Klaus Fuchs
  • Klaus Fuchs's Avatar Topic Author
  • Offline
  • New Member
More
6 years 9 months ago #162874 by Klaus Fuchs
Replied by Klaus Fuchs on topic individual position of extra fields in item.php
JUHHHHUUUUUUU

Thank u so much, now - finally - it works you made my day
Thank you so much
Klaus

You will never hear these phrases from us:
We can't do that | I don't know what that is | I did everything on my own | That's too early | That's too late | It's too bad we couldn't work together | Let's catch up sometime | I'm sorry, I'm too busy | That was all my idea | If our competitors don't hav

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

  • Klaus Fuchs
  • Klaus Fuchs's Avatar Topic Author
  • Offline
  • New Member
More
6 years 9 months ago #162875 by Klaus Fuchs

You will never hear these phrases from us:
We can't do that | I don't know what that is | I did everything on my own | That's too early | That's too late | It's too bad we couldn't work together | Let's catch up sometime | I'm sorry, I'm too busy | That was all my idea | If our competitors don't hav

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

More
6 years 9 months ago - 6 years 9 months ago #162904 by alexandria
Replied by alexandria on topic individual position of extra fields in item.php
Hello,
great !
this method come from the original item.php and you can see it too in the bottom of krikor link :
github.com/kricore/Advanced-templating-with-K2/blob/master/_inc/cheatsheet.php#L168-L173 within the method to change social links for icons.

have a nice day
Last edit: 6 years 9 months ago by alexandria.

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


Powered by Kunena Forum