Maximum size in HTML_Template_IT setVariable call?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nick7001

    #1

    Maximum size in HTML_Template_IT setVariable call?

    Hi all,
    I am using the HTML_Template_I T package.

    I would like to use a template something like below.

    <!-- BEGIN TOPIC -->
    <h1>{TITLE} ....{TOPLINK}.. .</h1>

    {TOPIC-TEXT}
    <!-- END TOPIC -->


    Then have a while loop in the .php code which list topic headers
    followed by topic text.

    My question:

    Can I do something like
    while( there are more topics){
    $template->setVariable("T ITLE", $title);
    $template->setVariable("T OPICLINK", $link);
    $template->setVariable("T OPIC-TEXT", require ("..../{$topic}.inc")) ;
    }

    In order to include the topic text at the correct point? Also is there
    a maximum size of text that I can
    assign to a variable, some of the texts may be several hundred
    characters long.

    regards,
    Nick.

  • Mick Sharpe

    #2
    Re: Maximum size in HTML_Template_I T setVariable call?

    You will need something like:

    while( there are more topics){
    $title = ...
    $link = ...
    $text = ...
    $template->setCurrentBloc k("TOPIC");
    $template->setVariable("T ITLE", $title);
    $template->setVariable("T OPICLINK", $link);
    $template->setVariable("T OPIC-TEXT", $text);
    $template->parseCurrentBl ock();
    }


    Comment

    Working...