Results 1 to 2 of 2

Thread: Defining custom fields <%custom%>, or executing php code in template files.

  1. #1
    drakeraft is offline Registered User
    Join Date
    May 2002
    Posts
    2

    Default Defining custom fields <%custom%>, or executing php code in template files.

    Suppose I wish to define a custom field

    <%custom%> which I could place in a template file in the themes directory

    and which would display the PHPSESSID, for example.

    Basically I need custom PHP being executed within my template files, in the themese directory.

    I'm assuming the easiest way to do this would be to create a <%custom%> field, but then how would I do this?

    Or is there another way to have php executed within my template files? Basically I'm accepting two types of visitors, and I need to show them different fields.

    Thank you very much!

    Drake (mcgcuken@jollyroger.com)

  2. #2
    dody is offline Administrator
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,731

    Default

    If you want to execute php code inside template files, use
    <php> ....... </php> tag

    ex:

    <php>
    printf "testing php code";
    phpinfo();
    </php>

Similar Threads

  1. switch to smarty template engine
    By dody in forum v5.x
    Replies: 20
    Last Post: 01-10-2005, 05:58 PM
  2. Undestanding templates
    By dody in forum Tutorials, Hints & Tips
    Replies: 2
    Last Post: 01-04-2004, 04:37 AM
  3. Replies: 4
    Last Post: 05-28-2003, 07:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •