HTML in K2 title like in Creativity template?

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sun Apr 20, 2014 1:28 pm
Reply with quote
Report this post
Hi,
how can I achieve posibility in News2 template that whenever I add some marker (in Creativity are is __) to be able to customize that text?

Thanks,
Gorast
User avatar
Platinum Boarder

GK User
Sun Apr 20, 2014 1:56 pm
Reply with quote
Report this post
A little too quick on questions :/ Sorry ;D
I done it.

In ROOT/templates/gk_news2/html/com_k2/templates/(your template or default)/item.php replace this line:
Code: Select all
<h1><?php echo $this->item->title; ?></h1>


with this:
Code: Select all
<h1><?php echo preg_replace('/__(.*?)__/i', '<small>${1}</small>', $this->item->title) ?></h1>


You can replace <small> with class of your wish.

Thanks :D
Gorast
User avatar
Platinum Boarder


cron