test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • andbeyond Friend
    #184541

    I 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 Friend
    #481951

    Hi 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 Friend
    #481988

    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.

    HeR0 Friend
    #482103

    Hi 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>
    Regards

    andbeyond Friend
    #482216

    Works perfectly, thank you so much!!!!!

    andbeyond Friend
    #482289

    Dear 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 Friend
    #482303

    Hi,

    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

    andbeyond Friend
    #482759

    Thank 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.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 8 replies, has 2 voices, and was last updated by  andbeyond 11 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum