Keyword

Menu Item to multiple category shows full article

  • ataman79
  • ataman79's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #144997 by ataman79
Hi,

I have the next problem. When I link a menu item to two categories, all items are shown with full text, but not with intro text only?!?! If i link only one category all is ok, but more than one shows full articles
I set for both categories to use intro text

How can I solve this (except adding Read more line in each article) ?

Thank you in advance

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #145008 by Krikor Boghossian
Replied by Krikor Boghossian on topic Menu Item to multiple category shows full article
You can hardcode a limit in your overrides.
<?php echo K2HelperUtilities::wordLimit($this->item->introtext, 15); ?>

Although the most optimal solution would be to use the read more button.

More on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

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

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

  • ataman79
  • ataman79's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #145010 by ataman79
Thanks Krikor,

where should I hardcore it, in category.php of my template ?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #145014 by Krikor Boghossian
Replied by Krikor Boghossian on topic Menu Item to multiple category shows full article
It's the category-item.php file.

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

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

  • ataman79
  • ataman79's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #145042 by ataman79
Thank you

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #145062 by Krikor Boghossian
Replied by Krikor Boghossian on topic Menu Item to multiple category shows full article
You 're welcome.

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 6 months ago - 8 years 6 months ago #152409 by Villy Koutsogianni
Replied by Villy Koutsogianni on topic Menu Item to multiple category shows full article
Hi
I face the same problem when I see authors`s list of articles, as I dont use Read more in items I only use intro text limit form category configuration.
I am not familiar with php so can you please advise me in witch line of category-item.php file should I add the line of code you have suggested?

I have check post #146062 that gives the line in witch I should add the code, but my file does not contain <div class="catItemIntroText">

Please note that I have noticed a difference between com_k2 files and those in template/html. I have replaced them and the layout of my template became a mess, so I used those of the template again.

I hope you can help me with this
best regards
Last edit: 8 years 6 months ago by Villy Koutsogianni. Reason: added information

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152426 by Krikor Boghossian
Replied by Krikor Boghossian on topic Menu Item to multiple category shows full article
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

This post will help you understand K2's files and overrides.
The file you need to edit is user.php and the code for that file is:
<?php if($this->params->get('userItemIntroText')): ?>
			  <!-- Item introtext -->
			  <div class="userItemIntroText">
			  	<?php echo K2HelperUtilities::wordLimit($item->introtext, 15); ?>
			  </div>
			  <?php endif; ?>

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 6 months ago #152451 by Villy Koutsogianni
Replied by Villy Koutsogianni on topic Menu Item to multiple category shows full article
Thanks Krikor

That did the job!!!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152469 by Krikor Boghossian
Replied by Krikor Boghossian on topic Menu Item to multiple category shows full article
You 're welcome Villy :)

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