- Posts: 47
COMMUNITY FORUM
Item page, Written by Author Link
- Tracey
-
Topic Author
- Offline
- Senior Member
Less
More
13 years 6 months ago #58092
by Tracey
Joomla! v3.5.1
Gantry5 - Hydrogen Template
k2 v2.7.0
Item page, Written by Author Link was created by Tracey
I may be missing something but is there a way to disable the author link contained on the item page?
I am aware that I can hide the author through the back-end settings, however I still want the author visible on the item page, I just don't want it to appear as a link.
So far the only way I see that this could be done is by modifying the item.php file.
Any suggestions?
I am using:
Joomla! v1.7.2
Joomlart JAT3 2.0 Framework
Joomlartt T3_blank template v1.0.6
k2 v2.5
I am aware that I can hide the author through the back-end settings, however I still want the author visible on the item page, I just don't want it to appear as a link.
So far the only way I see that this could be done is by modifying the item.php file.
Any suggestions?
I am using:
Joomla! v1.7.2
Joomlart JAT3 2.0 Framework
Joomlartt T3_blank template v1.0.6
k2 v2.5
Joomla! v3.5.1
Gantry5 - Hydrogen Template
k2 v2.7.0
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 6 months ago #58093
by william white
Replied by william white on topic Re: Item page, Written by Author Link
That would be the correct way to do it. Searc h for the code in item.php and change it. Best to do it in a k2 template or override and it wont be wiped upon upgrades
Please Log in or Create an account to join the conversation.
- Tracey
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 47
13 years 6 months ago - 13 years 6 months ago #58094
by Tracey
Joomla! v3.5.1
Gantry5 - Hydrogen Template
k2 v2.7.0
Replied by Tracey on topic Re: Item page, Written by Author Link
Thanks William.
I changed the following in my item.php override,
[code type=php-brief]
<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
<?php if(empty($this->item->created_by_alias)): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php else: ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>[/code]
to this,
[code type=php-brief]
<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
<?php if(empty($this->item->created_by_alias)): ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>[/code]
Hope someone else finds this useful.
I changed the following in my item.php override,
[code type=php-brief]
<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
<?php if(empty($this->item->created_by_alias)): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php else: ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>[/code]
to this,
[code type=php-brief]
<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
<?php if(empty($this->item->created_by_alias)): ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>[/code]
Hope someone else finds this useful.
Joomla! v3.5.1
Gantry5 - Hydrogen Template
k2 v2.7.0
Please Log in or Create an account to join the conversation.