Keyword

Get intro text to wrap next to the item image

More
12 years 6 months ago #66332 by Anna
How do I get the intro text to wrap to the right of the item image instead of below it so I don't have a lot of white space? Also is there a way to get rid of the all caps in the title?

www.linengineeringasia.com/index.php/en/1-8-high-torque-stepper-motors/20mm-frame-size/208

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 6 months ago #66333 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Get intro text to wrap next to the item image
Hi Angela,

It's best you do this with template overrides. Do check out the tutorial section.

You need to open the item.php
Remove the
					
K2 Rocks \m/

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

More
11 years 5 months ago - 11 years 5 months ago #66334 by David Olsson
Replied by David Olsson on topic Re: Get intro text to wrap next to the item image
Hi Kannan,

Sorry to bother you but i have changed following all your steps but can't reach final result...Main image is now to the left so theoretically I should just put intro text after it and it should wrap to right and below main image, right? This is what I think is the intro text in item.php :
/div>
<?php endif; ?>

<?php if(!empty($this->item->fulltext)): ?>
<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<div class="itemIntroText">

I have managed to move it around so it seems like this is the part but wondered if maybe it has to be linked to full text section as I would like it in this order: Main image, intro text wrapped to main image, image galery and then full text. Can it be done?

Thanks in advance. Here is more details of item.php file:

<div class="itemBody">

<!-- Plugins: BeforeDisplayContent -->
<?php echo $this->item->event->BeforeDisplayContent; ?>

<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $this->item->event->K2BeforeDisplayContent; ?>

<?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
<!-- 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>
<?php endif; ?>

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

<?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?>
<!-- Item image gallery -->
<a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a>
<div class="itemImageGallery">
<h3><?php echo JText::_(''); ?></h3>
<?php echo $this->item->gallery; ?>
</div>
<?php endif; ?>

<?php if($this->item->params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?>
<!-- Item navigation -->
<div class="itemNavigation">

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

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

<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="itemExtraFields">
<h3><?php echo JText::_('Main Points'); ?></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; ?>

<?php if($this->item->params->get('itemHits') || ($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0)): ?>
<div class="itemContentFooter">

<?php if($this->item->params->get('itemHits')): ?>
<!-- Item Hits -->
<span class="itemHits">
<?php echo JText::_('K2_READ'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('K2_TIMES'); ?>
</span>
<?php endif; ?>

<?php if($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0): ?>
<!-- Item date modified -->
<span class="itemDateModified">
<?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>

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

Davson

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
11 years 5 months ago #66335 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Get intro text to wrap next to the item image
Hi Davson,

Is it possible to see the page online ? can you share the url please.

K2 Rocks \m/

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

More
11 years 5 months ago #66336 by David Olsson
Replied by David Olsson on topic Re: Get intro text to wrap next to the item image
Hi
an example here:
skipropertyshop.com/index.php/component/k2/buy-ski-property/470
I would like the into text just below the image gallery to be wrapped right and below main image.

Thanks in advance
davson

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 5 months ago #66337 by Yiota
This page doesn't have any introtext. All text is inside the fulltext.
The fulltext is set to load after imageGallery and itemNavigation in your template override of K2, therefore the text cannot wrap next to the image.

You could either put some text in your introtext which would load wrapped to the image,

OR

if you want to keep all your text inside the fulltext you could either move the image block before the fulltext block or the fulltext block after the image block inside the item.php of your K2 override.

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

More
11 years 5 months ago #66338 by David Olsson
Replied by David Olsson on topic Re: Get intro text to wrap next to the item image
Thanks for clarifying regarding intro text. i was under the impression that when entering the "read more" separation it transformed into intro text (before) and full text (after) as i could see this first part before "read more" in form of "intro text " in search results...
How to I set up an real "intro text" space in K2 back end ? And after, how to I make it load and wrap around main image to the right and below? This intro text would have to be formatted (font & colour) in category (also word limit would be idea say 40-50 words. You can see here search result page as example: skipropertyshop.com/index.php/component/jak2filter/?Itemid=435&xf_3=1&xf_6=0&xf_9=0&ja_portfolio_tpl=ja_portfolio&__utma=30582973.396394303.1355740922.1356614772.1356620003.9&__utmz=30582973.1356521540.7.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)&t3-tour-firstshow=1&7d90c66f0fb432fc65539d47a96dc30c=cf57a2cb56376d976f61a00bef5d3c9c&jpanesliders_menu-sliders-435=0&jpanesliders_panel-sliders=0&jpanesliders_position-icon=0&7240a5610b002e81d8bb4dd4d021f8c7=e3d86141bd56bdf08b9864b76ca2957c&configuration=system&jpanesliders_permissions-sliders=0&jpanesliders_menu-sliders-565=0&jpanesliders_menu-sliders-566=0&jpanesliders_menu-sliders-=0


Thanks Yiota

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 5 months ago #66339 by Yiota
The separation between intro text and fulltext is indeed working exactly the same for K2 as it works for Joomla! articles, with the Read More separator.

If you have Disabled the "Use one editor window for introtext & fulltext" option from the K2 General parameters, the Read More separator won't work. You would have to put the introtext in the first box and the fulltext in the second box.

To the specific item, though, it seems that no introtext was setup and all text was showing to fulltext.
When you edited the specific item in the backend you saw the Read More separator?

The word limit is set to the category parameters under the "Item view options in category listings" named "Introtext word limit". You can set it up there.

The formatting is a CSS matter. Try to show the introtext in the correct container and we will work with the rest.

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

More
11 years 5 months ago #66340 by David Olsson
Replied by David Olsson on topic Re: Get intro text to wrap next to the item image
Thanks Yiota,

I have now disabled intro + full texts as one so intro and full are clearly separated (prefer it this way. I have entered word limit for intro in category listing option but cannot see any result... Went to categories tab, edited main category (ski properties) and added word limit to 20 in intro text in item view options in category listings. Then linked the different sub categories to inherit from main category (ski properties)...Maybe I am missing something...

Now that i have intro properly separated from full text, hope I can format (say per category) font, size etc and float to right of main image to the right. Thanks so much for helping again.

Davson

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


Powered by Kunena Forum