Keyword

E-Mail Share Link in Category Item

  • sunconcept
  • sunconcept's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 4 months ago #165387 by sunconcept
E-Mail Share Link in Category Item was created by sunconcept
Hi Guys,

I tried to put an E-Mail Share Link in an override of the categorie_item.php. I copied the following from the item.php:

<?php echo $this->item->emailLink; ?>

But it doesnt work... What do I have to do?

Greetings
Tobias

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #165390 by william white
Replied by william white on topic E-Mail Share Link in Category Item
try the entire block of code from item.php
<?php if($this->item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
			<!-- Email Button -->
			<li>
				<a class="itemEmailLink" rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;">
					<span><?php echo JText::_('K2_EMAIL'); ?></span>
				</a>
			</li>
			<?php endif; ?>

Please Log in or Create an account to join the conversation.

  • sunconcept
  • sunconcept's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 4 months ago #165391 by sunconcept
Replied by sunconcept on topic E-Mail Share Link in Category Item
I tried this before and extracted the needed HTML for me:
<a rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=480,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"><i class="fa fa-share" aria-hidden="true"></i></a>

But it doesnt work It seems, that the <?php echo $this->item->emailLink; ?> is empty in the category_item.php

Any ideas?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #165412 by Krikor Boghossian
Replied by Krikor Boghossian on topic E-Mail Share Link in Category Item
$this->item->link is available in the category_item or you can use the ?tmpl=component / ?template=system suffixes as well.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum