Keyword

Change Intro Text Word Count

More
8 years 3 months ago - 8 years 3 months ago #154989 by Uriel
Change Intro Text Word Count was created by Uriel
If you go to the URL below, you will see K2 items from the category "Proyectos Realizados"

gradeco.com.co/index.php/proyectos-realizados

The problem here is that the intro text from K2 does not let me show full text.

I want to know where I can change the intro text word count, so it does not gets cut out?

I am using Joomla 1.5.24 with K2 Version 2.5.4

You can see this IMAGE --> imgur.com/4ytvoGZ
Last edit: 8 years 3 months ago by Uriel.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #154994 by Krikor Boghossian
Replied by Krikor Boghossian on topic Change Intro Text Word Count
Hello Uriel,

You can remove the word limit from the category's settings.

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

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

More
8 years 3 months ago #155023 by Uriel
Replied by Uriel on topic Change Intro Text Word Count
Where is that?

I went inside categories and there was no word limit but only one number "150"

Please see image. imgur.com/cnQfSj5

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

More
8 years 3 months ago #155024 by Uriel
Replied by Uriel on topic Change Intro Text Word Count
Even if I eliminate the number "150" the text stays the same.

By the way, there is no cache involved.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155057 by Krikor Boghossian
Replied by Krikor Boghossian on topic Change Intro Text Word Count
gradeco.com.co/index.php/proyectos-realizados?template=protostar

In the default template there is no limit. This means that the limit has been hardcoded in the templates.
You can look at category_item.php (most likely) and remove the hardcoded limit.

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

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

More
8 years 3 months ago #155168 by Uriel
Replied by Uriel on topic Change Intro Text Word Count
OK I had to go to /templates/jt015_j15/html/com_k2/templates/portfolio/category_item.php

and change the limitation around line 130

I changed 200 to 400
<?php if($this->item->params->get('catItemIntroText')): ?>
				<!-- Item introtext -->
				<div class="catItemIntroText">
					<?php echo substr($this->item->introtext, 0, 200); ?>
				</div>
				<?php endif; ?>

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

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155178 by Krikor Boghossian
Replied by Krikor Boghossian on topic Change Intro Text Word Count
You can also use echo $this->item->introtext; which will inherit the limit given in K2's category settings.

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