-
AuthorPosts
-
pavit Moderator
pavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
January 16, 2017 at 8:25 pm #1002829Hello
Could you explain in details what are you trying to achieve exactly ? you want to edit pdf file ?
January 16, 2017 at 8:28 pm #1002830Need to manualy change file, so that Phoca PDF will start working..
So I need to edit layout, as seen on instructions. But in JoomlArt case:
_Be aware, some of templates override content files, it means, the files to display content (article) are not used from comcontent area but from template area. Then the template file needs to be overriden.
pavit Moderator
pavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
January 16, 2017 at 8:38 pm #1002834Hello
In Joomla you can override everything you want , simply go to template manager -> select template menu from the left sidebar -> edit your template and in the Create Override tab select which extension you want to override –
It will create a new folder into /templates/yourtemplate/html/ folder
Take also a look HERE
Regards
January 16, 2017 at 8:41 pm #1002836So everything is prepeared, component, plugin etc.. I only need to edit layout file, which is probably custom use in Ja_Biz theme case, because general file if I edit nothing change…
So I need path and file name where I can edit this …
I do not want to override original file use..
January 16, 2017 at 8:43 pm #1002837In path:
templates
ja_biz
html
com_content
article
I can not find block for "printing" etc…pavit Moderator
pavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
January 16, 2017 at 8:49 pm #1002839If you want to edit ja_biz article layout then you should edit this file
/templates/ja_biz/html/com_content/article/default.phpIt is already overrided by default ( because it is customized for template )
Regards
January 16, 2017 at 8:52 pm #1002841Yea.. this is the same link I provide you…
and which code is for changing printing icon etc…? In the whole file there is not even one line regarding "printing"…
<?php
/**- @package Joomla.Site
- @subpackage com_content
- @copyright Copyright (C) 2005 – 2013 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’);
JHtml::addIncludePath(T3_PATH . ‘/html/com_content’);
JHtml::addIncludePath(dirname(dirname(FILE)));// 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’, 2);
$aInfo1 = ($params->get(‘show_publish_date’) || $params->get(‘show_category’) || $params->get(‘show_parent_category’) || $params->get(‘show_author’));
$aInfo2 = ($params->get(‘show_create_date’) || $params->get(‘show_modify_date’) || $params->get(‘show_hits’));
$topInfo = ($aInfo1 && $info != 1) || ($aInfo2 && $info == 0);
$botInfo = ($aInfo1 && $info == 1) || ($aInfo2 && $info != 0);
$icons = $params->get(‘access-edit’) || $params->get(‘show_print_icon’) || $params->get(‘show_email_icon’);JHtml::(‘behavior.caption’);
JHtml::(‘bootstrap.tooltip’);
?><?php if ($this->params->get(‘show_page_heading’, 1)) : ?>
<div class="page-header clearfix">
<h1 class="page-title"><?php echo $this->escape($this->params->get(‘page_heading’)); ?><?php endif; ?>
<div class="item-page<?php echo $this->pageclass_sfx ?> clearfix"><?php if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative) : ?>
<?php echo $this->item->pagination; ?>
<?php endif; ?><article itemscope itemtype="http://schema.org/Article">
<meta itemprop="inLanguage" content="<?php echo ($this->item->language === ‘*’) ? JFactory::getConfig()->get(‘language’) : $this->item->language; ?>" />
<meta itemprop="url" content="<?php echo JRoute::(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)) ?>" />
<meta itemscope itemprop="mainEntityOfPage" itemtype="http://schema.org/WebPage" itemid="<?php echo JRoute::(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)) ?>" /><?php if(!$params->get('show_modify_date')) { ?> <meta content="<?php echo JHtml::_('date', $this->item->modified, 'c'); ?>" itemprop="dateModified"><?php } ?>
<?php if(!$params->get(‘show_publishdate’)) { ?>
<meta content="<?php echo JHtml::(‘date’, $this->item->publish_up, ‘c’); ?>" itemprop="datePublished">
<?php } ?><?php if ($params->get(‘show_title’)) : ?>
<?php echo JLayoutHelper::render(‘joomla.content.item_title’, array(‘item’ => $this->item, ‘params’ => $params, ‘title-tag’=>’h1’)); ?>
<?php endif; ?><?php if (!$params->get(‘show_intro’)) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?><?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ($topInfo || $icons) : ?>
<aside class="article-aside clearfix">
<?php if ($topInfo): ?>
<?php echo JLayoutHelper::render(‘joomla.content.info_block.block’, array(‘item’ => $this->item, ‘params’ => $params, ‘position’ => ‘above’)); ?>
<?php endif; ?><?php if ($icons): ?> <?php echo JLayoutHelper::render('joomla.content.icons', array('item' => $this->item, 'params' => $params, 'print' => $this->print)); ?> <?php endif; ?><?php endif; ?>
<?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == ‘0’)) || ($params->get(‘urls_position’) == ‘0’ && empty($urls->urls_position))) || (empty($urls->urls_position) && (!$params->get(‘urls_position’)))): ?>
<?php echo $this->loadTemplate(‘links’); ?>
<?php endif; ?><?php if ($params->get(‘access-view’)): ?>
<?php echo JLayoutHelper::render(‘joomla.content.fulltext_image’, array(‘item’ => $this->item, ‘params’ => $params)); ?><?php if (!empty($this->item->pagination) AND $this->item->pagination AND !$this->item->paginationposition AND !$this->item->paginationrelative): echo $this->item->pagination; endif; ?> <section class="article-content clearfix" itemprop="articleBody"> <?php if (isset ($this->item->toc)) : ?> <?php echo $this->item->toc; ?> <?php endif; ?> <?php echo $this->item->text; ?> </section><?php if ($botInfo) : ?>
<footer class="article-footer clearfix">
<?php echo JLayoutHelper::render(‘joomla.content.info_block.block’, array(‘item’ => $this->item, ‘params’ => $params, ‘position’ => ‘below’)); ?><?php endif; ?>
<?php if ($params->get(‘show_tags’, 1) && !empty($this->item->tags)) : ?>
<?php echo JLayoutHelper::render(‘joomla.content.tags’, $this->item->tags->itemTags); ?>
<?php endif; ?><?php if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && !$this->item->paginationrelative): ?> <?php echo '<hr class="divider-vertical" />'; echo $this->item->pagination; ?> <?php endif; ?> <?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == '1')) || ($params->get('urls_position') == '1'))): ?> <?php echo $this->loadTemplate('links'); ?> <?php endif; ?> <?php //optional teaser intro text for guests ?><?php elseif ($params->get(‘show_noauth’) == true and $user->get(‘guest’)) : ?>
<?php echo $this->item->introtext; ?>
<?php //Optional link to let them register to see the whole article. ?>
<?php if ($params->get(‘showreadmore’) && $this->item->fulltext != null) :
$link1 = JRoute::(‘index.php?option=com_users&view=login’);
$link = new JURI($link1);
?>
<section class="readmore">
<a href="<?php echo $link; ?>">
<?php $attribs = json_decode($this->item->attribs); ?>
<?php
if ($attribs->alternativereadmore == null) :
echo JText::(‘COM_CONTENT_REGISTER_TO_READ_MORE’);
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
if ($params->get(‘show_readmoretitle’, 0) != 0) :
echo JHtml::(‘string.truncate’, ($this->item->title), $params->get(‘readmore_limit’));
endif;
elseif ($params->get(‘show_readmore_title’, 0) == 0) :
echo JText::sprintf(‘COM_CONTENT_READ_MORETITLE’);
else :
echo JText::(‘COM_CONTENT_READMORE’);
echo JHtml::(‘string.truncate’, ($this->item->title), $params->get(‘readmore_limit’));
endif; ?>
<?php endif; ?>
<?php endif; ?><?php if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && $this->item->paginationrelative): ?>
<?php echo $this->item->pagination; ?>
<?php endif; ?><?php echo $this->item->event->afterDisplayContent; ?>
pavit Moderator
pavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
January 16, 2017 at 8:53 pm #1002842I can not find block for "printing" etc…
Try to look at this file /components/com_content/views/article/tmpl/default.php.
January 16, 2017 at 8:53 pm #1002843I need to add below of "Printing" the own text like "PDF"…
January 16, 2017 at 9:05 pm #1002846OK, this will do..
January 17, 2017 at 10:04 am #1003105OK, I tried.. but…
I don’t know exactly how to modify your file…
I need to add:
<?php
defined(‘JPATH_BASE’) or die;$canEdit = $displayData['params']->get('access-edit'); $phocaPDF = false; if (JPluginHelper::isEnabled('phocapdf', 'content')) { include_once(JPATH_ADMINISTRATOR.'/components/com_phocapdf/helpers/phocapdf.php'); $phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($displayData['item'], $displayData['params']); } ?> <div class="icons"> <?php if (empty($displayData['print'])) : ?> <?php if ($canEdit || $displayData['params']->get('show_print_icon') || $displayData['params']->get('show_email_icon') || $phocaPDF) : ?> <div class="btn-group pull-right"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span class="icon-cog"></span> <span class="caret"></span> </a> <?php // Note the actions class is deprecated. Use dropdown-menu instead. ?> <ul class="dropdown-menu"> <?php if ($displayData['params']->get('show_print_icon')) : ?> <li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $displayData['item'], $displayData['params']); ?> </li> <?php endif; ?> <?php if ($displayData['params']->get('show_email_icon')) : ?> <li class="email-icon"> <?php echo JHtml::_('icon.email', $displayData['item'], $displayData['params']); ?> </li> <?php endif; ?> <?php if ($canEdit) : ?> <li class="edit-icon"> <?php echo JHtml::_('icon.edit', $displayData['item'], $displayData['params']); ?> </li> <?php endif; ?> <?php echo $phocaPDF; ?> </ul> </div> <?php endif; ?> <?php else : ?> <div class="pull-right"> <?php echo JHtml::_('icon.print_screen', $displayData['item'], $displayData['params']); ?> </div> <?php endif; ?> </div>But don’t know how to do it on your file… it’s a little messy here..
January 17, 2017 at 10:40 am #1003117I figured out.. You can close case.
AuthorPostsViewing 12 posts - 1 through 12 (of 12 total)This topic contains 12 replies, has 2 voices, and was last updated by
simpleshop 8 years ago.The topic ‘Overrided content files’ is closed to new replies.
Overrided content files
Viewing 12 posts - 1 through 12 (of 12 total)
