can I create a template in ....

Discussion in 'Templates customization' started by ianternet, Jul 3, 2009.

  1. ianternet

    ianternet aMember Pro Customer

    Joined:
    Jun 26, 2009
    Messages:
    52
    can i create a template in he templates folder? and call it?

    I have managed to create a template so I can use some of the code in amember like the payment history and all that good stuff. now how would I call it?

    for example members.html is member.php

    so how would I call a new .html file I created?

    also I uploaded a template folder that I would like to use, how can I call the folder and specific files?
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    I have designed two replacement member.html files. One with information for paid up (or expired) members and the other for pending. One called members.html and the other pending.html (original some would think!!).

    I have then added a condition in member.php to display the correct one.

    So what you are suggesting is almost certainly possible. You need to decide under what circumstances you want your new template file to be called and post back. Might then have suggestions.

    Mind you I basically have a single membership but 3 products. Signup, renew for one year or renew for 3 fo single renewal group. Yours could be much more complicated if you have several.
  3. ianternet

    ianternet aMember Pro Customer

    Joined:
    Jun 26, 2009
    Messages:
    52
    so there isnt a way to do separate sections? I want to do a separate sections for the members.php like have payments have its own page

    I figured what you are saying I am assuimg you are calling a page using this syntax

    {include file="newhtml.html"}

    but members.html is the only thing I can edit

    essentially I want to dissect the members.php and have sections of the file have its own page? is this possible? example payments.php/html to show the payments on its own separate page.
  4. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Make a copy of member.php and member.html
    Rename them your new file, eg, payments.php payments.html

    Then in the new payments.php, search for member.html and replace it with payments.html. In payments.html, edit out the stuff you don't want.


    David
  5. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Hi

    No I did not use the {include file="newhtml.html"} I changed the last block of code in member.php from

    PHP:
    $t->assign('member_links'$member_links);
    $left_member_links plugin_get_left_member_links($_SESSION['_amember_user']);
    $t->assign('left_member_links'$left_member_links);
    $t->assign('user'$_SESSION['_amember_user']);
    $t->display('member.html');
    ?>
    to

    PHP:
    $t->assign('member_links'$member_links);
    $left_member_links plugin_get_left_member_links($_SESSION['_amember_user']);
    $t->assign('left_member_links'$left_member_links);
    $t->assign('user'$_SESSION['_amember_user']);

    // Customisation 1 - Added to direct to members.html or pending.html

    $mem_status = ($_SESSION['_amember_user'][status]);

    if(
    $mem_status == '0') {
        
    $t->display('pending.html');
    }else {
        
    $t->display('member.html');
    }
    This creates the condition and sends the member to either the pending.html page or the members.html page. Based on the status condition used I could have expanded it to include yet another page for expired members.
  6. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Got this corrected... we'll see if this works for signup as well...

Share This Page