Page 1 of 1
PDF not showing in icon list?
Posted: 16 May 2018, 21:12
by MailBlade
Hello!
Thanks for this great component and plugin!
I have one problem though: After I follow install procedures (Joomla 3.6), and I make changes to the code as stated in "layouts/joomla/content/icons.php", the PDF icon does not appear.
However, if I make changes to the following file: "mytemplate/html/com_content/articles/pdf.php" THEN the changes appear. But, this code looks different and I can not find a way to add this part of code to it:
Code: Select all
$phocaPDF = false;
if (JPluginHelper::isEnabled('phocapdf', 'content')) {
include_once(JPATH_ADMINISTRATOR.'/components/com_phocapdf/helpers/phocapdf.php');
$phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($displayData['item'], $displayData['params']);
}
?>
I am also using a custom template and this "com_content" is already in the "html" override file, but I did not override it. It must have been the template. Can anyone help me?
Re: PDF not showing in icon list?
Posted: 16 May 2018, 23:55
by Jan
Hi,
if I make changes to the following file: "mytemplate/html/com_content/articles/pdf.php" THEN the changes appear.
I am not sure what exactly is the problem?
Anyway, did you try to use system plugin?
Jan
Re: PDF not showing in icon list?
Posted: 17 May 2018, 08:26
by MailBlade
Jan wrote: ↑16 May 2018, 23:55
Hi,
if I make changes to the following file: "mytemplate/html/com_content/articles/pdf.php" THEN the changes appear.
I am not sure what exactly is the problem?
Anyway, did you try to use system plugin?
Jan
Hi Jan, thanks for the reply.
When I add the code as stated in the documentation for Joomla 3.6, and copy the code as stated, the PDF icon does not appear. However, I have a file in my template's HTML folder called "com_content". Inside this "com_content" are 5 folders. One of them is "articles". In here, I can change the view for the icons and such. Here is the code from line 1-58 for file "C:\xampp\htdocs\sites\mysite\templates\as002087\html\com_content\article\default.php":
Code: Select all
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$app = JFactory::getApplication();
$tmpl = $app->getTemplate();
$template = $app->getTemplate(true);
include_once(JPATH_BASE.'/templates/'. $template->template .'/includes/functions.php');
// Create shortcuts to some parameters.
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user = JFactory::getUser();
$info = $params->get('info_block_position', 0);
JHtml::_('behavior.caption');
?>
<article class="page-item page-item__<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
</div>
<?php endif;
if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative)
{
echo $this->item->pagination;
}
if (!$this->print) :
if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<div class="item_icons btn-group pull-right">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <i class="fa fa-cog"></i> <span class="caret"></span> </a>
<?php // Note the actions class is deprecated. Use dropdown-menu instead. ?>
<ul class="dropdown-menu actions">
<?php if ($params->get('show_print_icon')) : ?>
<li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $this->item, $params); ?> </li>
<?php endif;
if ($params->get('show_email_icon')) : ?>
<li class="email-icon"><?php echo JHtml::_('icon.email', $this->item, $params); ?> </li>
<?php endif;
if ($canEdit) : ?>
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
<?php endif; ?>
</ul>
</div>
If I make changes to THIS file, "default.php", then they appear in the front-end.
Re: PDF not showing in icon list?
Posted: 18 May 2018, 23:01
by Jan
Hi, yes, this means, that your template overrides your Joomla! com_content output so in this case the code in com_content is not active.
Jan