PHP code like include_once() versus Smarty templates

Discussion in 'Templates customization' started by kel, Jul 21, 2004.

  1. kel

    kel aMember Pro Customer

    Joined:
    May 20, 2004
    Messages:
    16
    I'm trying to customize the signup page with my existing site. I thought the easiest would be to create a symbolic link from /myHeader.php to /amember/templates/header.html, and do the same for the footer. But my existing header uses PHP code, such as simple calls like include_once() and variables that set various things, like the page title, the text/images for the left and right columns, etc.

    When I use my existing header, I get PHP errors that say Smarty isn't able to parse the file. Does this mean I need to learn all about Smarty templates just to use my existing header/footer?

    If so, can you give me a crash course on how I can set PHP variables in the templates/header.html file so that I can properly populate my header file? I realize that I can start using static HTML for the signup page, but this seems like a real step backwards. I haven't looked at any of aMember's code yet to find a workaround. BTW there is *zero* documentation about the use of Smarty templates on CGI-Central's site, and I haven't had the time to dive into the Smarty website yet.
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Just add line to amember/templates/header.html

    {include_php file="/path/to/myHeader.php"}

    I don't think I could create better description of Smarty than Smarty authors.
  3. techhead

    techhead Guest

    include_php and html headers


    Can this same technique be used with an HTML file as in "myHeader.html"?
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Yes, of course.

Share This Page