- Posts: 14
COMMUNITY FORUM
Limit text title Module COntent
- Web75
-
Topic Author
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Sarah
-
- Offline
- New Member
- Posts: 14
please help, how do we do this title character limit?
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
You can edit the file: /modules/mod_k2_content/tmpl/default.php
Replace this text:
<?php if($params->get('itemTitle')): ?>
<a class="moduleItemTitle" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
<?php endif; ?>
With this code:
<?php if($params->get('itemTitle')): ?>
<a class="moduleItemTitle" href="<?php echo $item->link; ?>"><?php echo substr($item->title, 0, 20); ?></a>
<?php endif; ?>
This will limit the title to 20 characters for example, you can change the limit of course to match your design.
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- Sarah
-
- Offline
- New Member
- Posts: 14
1. is there any way to get the ... after the text title?
2. The readmore isn't showing up in the k2_content medule even tho it's enabled, do you know a work around to get that to pop up?
thank you again!
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
1- change
<?php echo substr($item->title, 0, 20); ?>
<?php echo substr($item->title, 0, 20).'...'; ?>
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- Sarah
-
- Offline
- New Member
- Posts: 14
here is the read more i enabled in the K2 Content Module: prntscr.com/2699vd
and
here is how it looks in my site: prntscr.com/269b4h
UPDATE:
I found this post from a user named "betneb"
Go to .../modules/mod_k2_content/tmpl/Default/default.php
if($params->get('itemReadMore') && $item->fulltext):
I've deleted the "&& $item->fulltext" part and now it's working fine.
and this worked for me, i hope it doesn't hurt anything...
Thanks again!
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- Sarah
-
- Offline
- New Member
- Posts: 14
I am making a charity website and I just noticed your logo and a logo on a component i think i need. Are you the dev of this www.joomseller.com/joomla-components/jse-donation.html
if so, i have a question. I would want random people who would want to, sign up on my site and start their own Fundraisers and lead people to the page (all money would go to one place of course) but this would let them see how much they are raising for their own fundraiser etc.. once they make a fundraiser, they can Lead others to their campaign page etc..
is this capable with this component?
also, is this working perfectly in j3.2?
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- Sarah
-
- Offline
- New Member
- Posts: 14
see pic here: prntscr.com/2ln6zu
WHAT I DID FOR A FIX - DID I DO IT RIGHT?
In the default.php i replaced the <li class... with <div class
and also closed it with </div> (it was </li>
did i do it correctly?
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
If the modification you did was made in the core file of the module make sure to take a backup when you update K2 because it will be lost. It is better when you choose to customise anything to create an override first.
Read here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates how overrides work.
Please Log in or Create an account to join the conversation.