Making article title a hyperlink

December 2012 Joomla Template
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Mar 21, 2016 10:45 pm
Reply with quote
Report this post
Hello,

I was wondering if it is easily possible to make the title of an article a hyperlink? I have played with the settings in global configuration and can make the article title a link on the blog page or homepage, but I was hoping that on the actual story page itself, the title of the article could also be a hyperlink?

Thanks so much!
User avatar
Senior Boarder

GK User
Thu Mar 24, 2016 12:26 am
Reply with quote
Report this post
User avatar
Senior Boarder

teitbite
Tue Mar 29, 2016 3:11 pm
Reply with quote
Report this post
Hi

You will have to edit file /html/com_content/atricle/default.php and turn this:

Code: Select all
      <?php if ($params->get('show_title')) : ?>
      <h1 itemprop="name">
          <?php echo $this->escape($this->item->title); ?>
      </h1>
      <?php endif; ?>


into

Code: Select all
      <?php if ($params->get('show_title')) : ?>
      <h1 itemprop="name">
          <a href="<?php echo $this->item->link; ?>"><?php echo $this->escape($this->item->title); ?></a>
      </h1>
      <?php endif; ?>
User avatar
Moderator

GK User
Tue Mar 29, 2016 10:48 pm
Reply with quote
Report this post
Hi there, thanks so much for your reply and help!

Unfortunately, I cannot find that file listed under
public_html/components/com_content
User avatar
Senior Boarder

teitbite
Mon Apr 04, 2016 9:35 am
Reply with quote
Report this post
Hi

It's not in component, but in template itself. A full path would be /templates/gk_news/html/com_content/atricle/default.php
User avatar
Moderator

GK User
Mon Apr 04, 2016 5:06 pm
Reply with quote
Report this post
Okay, that did the trick. Thanks so much!
User avatar
Senior Boarder

teitbite
Sat Apr 09, 2016 8:48 am
Reply with quote
Report this post
Hi
Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro or Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.