• Register or
  • Sign In
    • Forgot your password?
    • Forgot your username?
    Or sign in with your account on:
    Facebook
    Twitter

K2 | The powerful content extension for Joomla! developed by JoomlaWorks

  • home
  • about
  • blog
  • documentation
  • extend K2
  • showcase
  • community
  • demo
Leverage the power of rich media publishing the easy way!
  • Index
  • Recent Topics
  • Search
Welcome, Guest

To post messages, you need to login first.
K2 Community Forum
K2 Community Forum
New to K2? Ask here first!

Parameter for maximum caracter in the title
(1 viewing) (1) Guest
Reply Topic
New Topic
  • Page:
  • 1

TOPIC: Parameter for maximum caracter in the title

Parameter for maximum caracter in the title 3 months, 3 weeks ago #7968

  • Andreas V
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi,

i would like customizing the tilte. I would like setting maximum caracter in the title.
Please see link: www.checkdivers.com/index.php/cdc-blog

Example:
now:
boot 2012 - Erwartungen der Branche voll erfüllt

After setting:
boot 2012 - Erwartungen der Branche...

Can i setting this?

Thanks

Andyowl
Reply Quote

Re: Parameter for maximum caracter in the title 3 months, 3 weeks ago #7970

  • William White
  • ( Moderator )
  • OFFLINE
  • Moderator
  • Posts: 644
I have done this before by using a k2 override and finding the title in the category_item.php and reworking the php a bit with substring commands to display on the first x characters of every title.
wjwjr
Please include Joomla and K2 versions in your questions, also a link to your site if live will be helpfull
Reply Quote

Re: Parameter for maximum caracter in the title 3 months, 2 weeks ago #8023

  • Andreas V
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi,

i have tried it with
<?php echo $this->item->(title,30) ?>
but this code will not work.

I come with my knowledge further.

Help my please.

thanks and best regards

Andreas
Reply Quote

Re: Parameter for maximum caracter in the title 3 months, 2 weeks ago #8028

  • William White
  • ( Moderator )
  • OFFLINE
  • Moderator
  • Posts: 644
reference here
php.net/manual/en/function.substr.php
try something like

<?php echo substr($this->item->title,0,10); ?>
instead of
<?php echo $this->item->title; ?>
You will have to test it
wjwjr
Please include Joomla and K2 versions in your questions, also a link to your site if live will be helpfull
Reply Quote

Re: Parameter for maximum caracter in the title 3 months, 2 weeks ago #8108

  • Andreas V
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi William,

thanks for your help. This code work very perfect.

Thanks and best regards.

Andreas
Reply Quote
Reply Topic
New Topic
  • Page:
  • 1
K2 Community Forum
K2 Community Forum
New to K2? Ask here first!
Moderators: Simon Wells
Find this topic helpful? Why not share it with others?
Tweet
Powered by Kunena
Time to create page: 0.12 seconds
Advertisement
  • Contact us
  • Become a partner
back to top
Copyright © 2006 - 2012 JoomlaWorks Ltd. All rights reserved. K2 is released under the GNU/GPL v2 license.
Joomla! is a registered trademark of Open Source Matters, Inc. JoomlaWorks/K2 are not affiliated with or endorsed by Open Source Matters or the Joomla! Project.
developed by Nuevvo