Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • olayager Friend
    #193640

    How can I add the bonus menu in all my articles?

    MoonSailor Friend
    #517982

    A few steps below would help you get the feature:

    – First, you needs created new module menu:

    + Go to administrator -> modules manager -> click “New ” button then select “menu”

    + Set “Select Menu” with “the bonus menu”:

    + Assign the module position as “load-mod-in-art”

    – Second, put the module inside the article content:
    You need to open articles where you want this module to appear and insert following code {loadposition load-mod-in-art} in the article content:

    See this document for more reference: http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F

    You do the same for all articles.

    Extra note:
    If you want the module to appear before or after content of article, open the file “default.php” in folder “templates/ja_appolio/html/com_content/article”, then replace:


    <section class="article-content clearfix">
    <?php echo $this->item->text; ?>
    </section>

    With:


    <section class="article-content clearfix">
    <?php
    $document = JFactory::getDocument();
    $renderer = $document->loadRenderer('module');

    $params = array('style'=>'-2');
    $contents = '';
    foreach (JModuleHelper::getModules('load-mod-in-art') as $mod)
    {
    if($ovparams){
    $modparams = json_decode($mod->params);
    $modparams->created_by = $ovparams->created_by;
    $mod->params = json_encode($modparams);
    }
    $contents .= $renderer->render($mod, $params);
    }
    ?>
    <?php echo $this->item->text.$contents; ?>
    </section>

    Hope that helps.


    1. 1957468872
    2. 0101685397
    olayager Friend
    #518083

    What if I wanted it to be on the top of the page?
    Like the image attached, my bonus menu is the one on the top pf the page, but it only appears on that article.


    1. Screen-shot-2014-01-10-at-10.10.42-AM
    MoonSailor Friend
    #518162

    <blockquote>
    What if I wanted it to be on the top of the page?
    </blockquote>

    In your screenshort, I see only megamenu – not any menu added. Could you explain in more details?

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

This topic contains 4 replies, has 2 voices, and was last updated by  MoonSailor 10 years, 5 months ago.

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