Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • erickpaulino Friend
    #986758

    Hello,

    I am trying to add a new module position right at the end of articles, BEFORE the "You may also like" feature. I have read the instructions on https://www.joomlart.com/forums/topic/how-to-create-new-module-position-updated/ , but since the "you may also like" feature is hardcoded in the content block, I had no luck making it work. I can only put it after the "you may also like", which is not what I want.

    Can you please help me?

    Thank you,

    Erick

    Ninja Lead Moderator
    #987124

    Hi,

    You can follow this way to load the new position after "You may also like"

    • Create new module and assign this module with new-position position

    • Open templates/ja_magz/html/com_content/article/default_related.php file and add the source code below under <h2 class="header-related"><?php echo JText::_(‘TPL_TITLE_RELATED’)?>
    <?php 
    // position needs to load
    $load_modules = 'new-position';
    $attrs = array();
    $result = null;
    // Call the module
    $renderer = JFactory::getDocument()->loadRenderer('modules');
    $ads = $renderer->render($load_modules, $attrs, $result);
    // display the module
    if ($ads) : 
    ?>
        <div>
            <?php echo $ads ?>
        </div>
    <?php endif ?>

    Please make a backup old file before doing changes

    Regards

    erickpaulino Friend
    #987285

    Thank you! It works!

    It just doesn’t load the module name/title. How can I add it?

    Erick

    Ninja Lead Moderator
    #987437

    Hi Erick,

    I tried to find the load module title and name on this way but I could not see the option to support about this, it only loads the contact on this way.

    Or you can apply other ways here

    Regards

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

This topic contains 3 replies, has 2 voices, and was last updated by  Ninja Lead 8 years ago.

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