Keyword

item.php customization

  • Dimitris Dimokas
  • Dimitris Dimokas's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #62525 by Dimitris Dimokas
item.php customization was created by Dimitris Dimokas
I have make this changes to my item.php file because I wanted to have the additional info beside of the article image:


____________________________________________________________________________________________
<table style=" text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="2">
<tr>
<td style=" vertical-align: top;">

<!-- image block start -->
<!-- Item Image -->
<div class="itemImageBlock">
<span class="itemImage">
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
<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>

<?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
<!-- Image caption -->
<span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
<?php endif; ?>

<?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
<!-- Image credits -->
<span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
<?php endif; ?>

<div class="clr"></div>
</div>
<br>
</td>
<td style="vertical-align: top; width: 100%;">
<!-- image block end -->

<!-- extra fields block start -->
<!-- Item extra fields -->
<div class="itemExtraFields">
<?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; ?>">
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
</li>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<!-- extra fields block end -->

<br>
</td>
</tr>
</table>
___________________________________________________________________________________________


BUT
It works except of the case that I have not upload an image for an article. When I do't have an image then the additional info fields are not visible.
I'm not a html developer us you can see and I'm trying to build a site for my store.

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

More
12 years 9 months ago #62526 by william white
Replied by william white on topic Re: item.php customization
When there is no image it cannot take up the room. There may be a better way, but the quick way would be to create a generic image and add it to the items

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

  • Dimitris Dimokas
  • Dimitris Dimokas's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #62527 by Dimitris Dimokas
Replied by Dimitris Dimokas on topic Re: item.php customization
Thank you a lot
I took your solution.....

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


Powered by Kunena Forum