Keyword

Limiting introtext under tag lists?

  • 8-Bit Classics
  • 8-Bit Classics's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 10 months ago #90784 by 8-Bit Classics
Limiting introtext under tag lists? was created by 8-Bit Classics
I have figured this out under the Latest list, but I have a bunch of my categories listed via a tag then by the actual category. I am using a substr command to limit how much text can be displayed during the list, but I cannot find the actual PHP for this for tags. Looking at the source of the page, the div is referencing 'genericItemIntroText'. Anybody have a clue where I can look to make this change?

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

  • 8-Bit Classics
  • 8-Bit Classics's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 10 months ago #90785 by 8-Bit Classics
Replied by 8-Bit Classics on topic Limiting introtext under tag lists?
bump?

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

More
13 years 5 months ago #90786 by NintendoNerds
Replied by NintendoNerds on topic Limiting introtext under tag lists?
I know it's been quite awhile since the last post for this thread, but I found the topic via a Google search. I'm wanting to know how to do this as well.

 

How do you limit the items to a certain amount of intro text under tag listing? The default tag listing displays the whole article, which is not what I want it to do. I'd like the tag listing to display only a certain number of words or characters. Thanks!

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

More
13 years 5 months ago #90787 by NintendoNerds
Replied by NintendoNerds on topic Limiting introtext under tag lists?
Could someone please assist with this inquiry? There's got to be an easy way to do something like this.

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

More
13 years 5 months ago #90788 by william white
Replied by william white on topic Limiting introtext under tag lists?
Try line 80 of components/com_k2/templates/generic.php

If it works put it back and put the edit in the k2 override directory of your template

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

More
13 years 5 months ago #90789 by NintendoNerds
Replied by NintendoNerds on topic Limiting introtext under tag lists?
Thanks for the reply, William.

 

I found the file, but I'm not familiar enough with PHP to make changes to that file. Is it possible that you, or someone else here could try to edit, test it out, then post the code?

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

More
13 years 4 months ago #90790 by NintendoNerds
Replied by NintendoNerds on topic Limiting introtext under tag lists?
Does anyone have any idea how to do this?

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

More
13 years 4 months ago #90791 by NintendoNerds
Replied by NintendoNerds on topic Limiting introtext under tag lists?
I'm beginning to wonder if this can even be set for the tag listing.

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

More
13 years 4 months ago #90792 by Josh
Replied by Josh on topic Limiting introtext under tag lists?
Hi I came across this solution somewhere on this site but cant remember where.

Here is an example of what I found. May not be quite right but I am able to limit the intro text in tag view.

In generic.php as William said around line 80, try using this. Notice the uncommented <?php /* echo $item->introtext; */?> in line 4 in case I want to revert.


<?php if($item->params->get('genericItemIntroText')): ?>        <!-- Item introtext -->        <div class="genericItemIntroText">          <?php /* echo $item->introtext; */?>        </div>        <?php echo K2HelperUtilities::wordLimit($item->introtext,30); ?>        <?php endif; ?>

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

More
13 years 4 months ago #90793 by NintendoNerds
Replied by NintendoNerds on topic Limiting introtext under tag lists?
Thanks for the reply, Josh! Can you provide a link to your site before I go any further? Thanks again!

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


Powered by Kunena Forum