How to add extra block to member theme?

Discussion in 'Templates customization' started by kgp43, May 12, 2012.

  1. kgp43

    kgp43 Guest

    Joined:
    May 10, 2012
    Messages:
    4
    Hi,

    I created an extra block in 'themes/mytheme/blocks'.
    The name of my new block is 'member-main-ftpdetails.phtml', it's basically a copy of the useful links block;

    How do I make that block display under the useful links block within the members area?
    Must be after this part (main.phtml), but not sure how:

    PHP:
    <div class="am-coll-right">
            <div class="am-coll-content">
                <?php echo $this->blocks('member/main/right/top'?>
                <?php echo $this->blocks('member/main/right''<h2>%2$s</h2><div class="am-block" id="%3$s">%1$s</div>'); ?>
                <?php echo $this->blocks('member/main/right/bottom'?>
            </div>
        </div>
    Is it possible to add my own block below the one above?
  2. starwizard

    starwizard New Member

    Joined:
    Dec 26, 2011
    Messages:
    10
    I am curious to know this as well. How can we add a new block to the page?

    Is there a method using site.php?

    Thanks,
  3. siansell

    siansell New Member

    Joined:
    Oct 2, 2012
    Messages:
    8
    I just discovered how to do this using site.php after some digging around:

    PHP:
    $am Am_Di::getInstance();
    $am->blocks->add(new Am_Block('member/main/right''Block Title''unique-block-id'null'new-block.phtml'9999));
    //last argument 9999 controls order of the blocks in the region
    Template file new-block.phtml in
    themes/mytheme/blocks​
  4. ozlady

    ozlady New Member

    Joined:
    Sep 26, 2013
    Messages:
    15
    I have seen this as well.

    Is there any way to make this only viewable if the user has a certain level of membership?

Share This Page