PTM Logo Version 0.5.1 Beta
Home    SVN    Downloads    Documentation    Forum    Contact
This Site is 100%
Powered by PTM

SourceForge.net Logo
Documentation
I   Index
II   GNU GPL
III   Description
IV   Installation
V   Language Overview
VI   Tags
  DO
  DISPLAY
  FILE
  NOHTML
  PREPROCESS
  REQUIRE
  TEMPLATE
VII   Variables
VIII   Functions
IX   Modules
Documentation
View / Download this file.
-----------
NOHTML TAGS
-----------

  ----------
  TAG FORMAT
  ----------

    Where "Perl" represents your Perl code:

    <?NOHTML Perl NOHTML?>
    <?nohtml Perl nohtml?>
    <?nohtml Perl ?>
    <?* Perl *?>
    <?* Perl ?>
    <?*
      Perl
    ?>

  -----------
  DESCRIPTION
  -----------

    The NOHTML tag is used to import files into your PTM documents in a
    text-like manner for your web users to see. PTM tags will not be evaluated
    when the file is loaded, and HTML characters will be replaced with their
    ordinal macro equavalents so as to appear as standard text on your end
    user's screen. For example, the ampersand (&) symbol is replaced with
    '&#38;', as the ampersand is represented on the ASCII table as number 38.
    This makes sure that the HTML characters are shown to your end users as they
    were originally typed, and not as the web browser would normally interpret
    them. This is most useful when you wish to show your end users PTM or HTML
    examples, or the PTM/HTML source code of one of your pages. The contents of
    the NOHTML tag are evaluated to a file name before the file is loaded. This
    ability allows you to load files dynamically by using variables instead of
    having to use static file names. Because of this, however, the use of
    single (') and double (") quotes is necessary when passing a file name, as
    it will be evaluated as a Perl statement. Once evaluated to a file name, the
    NOHTML tag contents are passed to the "get_file_text" function behind the
    scenes. Therefore, no unquoted semicolons (;) should be placed inside a
    NOHTML tag, as it would prematurely end the function call.

  --------------
  USAGE EXAMPLES
  --------------

    ---------------------------------------------------------
    Example 1: Loading a File by calling its Static File Name
    ---------------------------------------------------------

      <?* "file.html" ?>

    ----------------------------------------------------------
    Example 2: Loading a File from a Name Stored in a Variable
    ----------------------------------------------------------

      <?* $file ?>

    --------------------------------------------------------------------
    Example 3: Loading ".html" Files 1-10 with the DO Tag and a For Loop
    --------------------------------------------------------------------

      <? for ($i = 1; $i <= 10; $i++) { ?>
        <?* "$i.html" ?>
      <? } ?>
Home    SVN    Downloads    Documentation    Forum    Contact