-
AuthorPosts
-
andbeyond Friend
andbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
January 31, 2013 at 5:10 am #184541I would like to create a module position and position it next to the article tools (email icon and print icon).
Can anyone get me started on how to do this?
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
February 1, 2013 at 7:22 am #481951Hi Andbeyond,
Article tool only appear when you go to article detail page. It is not available for module and does not relate to module position.
Regards
andbeyond Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
February 1, 2013 at 10:10 am #481988The email and article icons are placed on all articles in the main content block on the right hand side below the article heading. I would like to place a module next to them on all pages.
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
February 2, 2013 at 2:05 am #482103Hi Andbeyond,
If the active template does not override article layout, please open file pluginssystemjat3jat3base-themesdefaulthtmlcom_contentarticledefault.php .Otherwise, open file templates/template_active_name/html/com_content/article/default.php
Find
[PHP]<?php if ($useDefList || $canEdit || $params->get(‘show_print_icon’) || $params->get(‘show_email_icon’)) : ?>
<div class=”article-tools clearfix”>
<?php if ($canEdit || $params->get(‘show_print_icon’) || $params->get(‘show_email_icon’)) : ?>
<ul class=”actions”>
<?php if (!$this->print) : ?>
<?php if ($params->get(‘show_print_icon’)) : ?>
<li class=”print-icon”>
<?php echo JHtml::_(‘icon.print_popup’, $this->item, $params); ?>
</li>
<?php endif; ?><?php if ($params->get(‘show_email_icon’)) : ?>
<li class=”email-icon”>
<?php echo JHtml::_(‘icon.email’, $this->item, $params); ?>
</li>
<?php endif; ?><?php if ($canEdit) : ?>
<li class=”edit-icon”>
<?php echo JHtml::_(‘icon.edit’, $this->item, $params); ?>
</li>
<?php endif; ?><?php else : ?>
<li>
<?php echo JHtml::_(‘icon.print_screen’, $this->item, $params); ?>
</li>
<?php endif; ?></ul>
<?php endif; ?>[/PHP]
Add add code
[PHP]<?php
$modules = JModuleHelper::getModules(‘module_position_name’);
$attribs = array(‘style’=>’JAxhtml’);
if(count($modules)) {
foreach($modules as $module) {
echo JModuleHelper::renderModule($module, $attribs);
}
}
?>[/PHP]
to below it.
Hope this help.
<em>@andbeyond 358092 wrote:</em><blockquote>The email and article icons are placed on all articles in the main content block on the right hand side below the article heading. I would like to place a module next to them on all pages.</blockquote>
Regards1 user says Thank You to HeR0 for this useful post
andbeyond Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
February 3, 2013 at 11:54 am #482216Works perfectly, thank you so much!!!!!
andbeyond Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
February 4, 2013 at 7:59 am #482289Dear HeRo,
I thought your solution worked perfectly but not quite.
The module appears in the right position and works perfectly, however the print and email icons are no longer clickable. ie when you roll the mouse over nothing happens. If I delete the code the added code the print and email work again.
here is the php code,have I put it in the wrong place or is there another issue?
Hope you can help,
<blockquote><div class=”article-tools clearfix”>
<?php if ($canEdit || $params->get(‘show_print_icon’) || $params->get(‘show_email_icon’)) : ?>
<ul class=”actions”><?php if (!$this->print) : ?>
<?php if ($params->get(‘show_print_icon’)) : ?>
<li class=”print-icon”>
<?php echo JHtml::_(‘icon.print_popup’, $this->item, $params); ?>
</li>
<?php endif; ?><?php if ($params->get(‘show_email_icon’)) : ?>
<li class=”email-icon”>
<?php echo JHtml::_(‘icon.email’, $this->item, $params); ?>
</li>
<?php endif; ?><?php if ($canEdit) : ?>
<li class=”edit-icon”>
<?php echo JHtml::_(‘icon.edit’, $this->item, $params); ?>
</li>
<?php endif; ?><?php else : ?>
<li>
<?php echo JHtml::_(‘icon.print_screen’, $this->item, $params); ?>
</li>
<?php endif; ?></ul>
<?php endif; ?>
<?php
$modules = JModuleHelper::getModules(‘absemailthingy’);
$attribs = array(‘style’=>’JAxhtml’);
if(count($modules)) {
foreach($modules as $module) {
echo JModuleHelper::renderModule($module, $attribs);
}
}
?> </blockquote>HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
February 4, 2013 at 8:33 am #482303Hi,
I only show that to you as an example. In the order to do this, you must add that code to a desired position on your template. Because on other template, its usually more different from layout overridden from Joomla article. In your case, please add that code to under user tool block.
<div class="article-tools clearfix">
...................
</div>
<div class="module-inside-article">
<?php
$modules = JModuleHelper::getModules('absemailthingy');
$attribs = array('style'=>'JAxhtml');
if(count($modules)) {
foreach($modules as $module) {
echo JModuleHelper::renderModule($module, $attribs);
}
}
?>
</div>Regards
1 user says Thank You to HeR0 for this useful post
andbeyond Friendandbeyond
- Join date:
- November 2011
- Posts:
- 55
- Downloads:
- 4
- Uploads:
- 0
- Thanks:
- 19
- Thanked:
- 8 times in 1 posts
February 7, 2013 at 4:23 am #482759Thank you, I’ve got it all working now.
What I ended up doing was placing the “module-inside-article” div inside the “article-tools” div. That seemed to work best in terms of positioning the module next to the print icon etc.
-
AuthorPosts
This topic contains 8 replies, has 2 voices, and was last updated by andbeyond 11 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum