Assign variable problem with img tag & includePHP

  • Please help;


    Code
    {assign var='img' value='<img src="path/to/img.gif" alt="" />'}


    In template;


    HTML
    {img}


    Why the output only code not the image it self?

    Sorry for my bad english :D

    Edited once, last by Ferdinand ().

  • @ fun.Baker : working perfectly :thumbsup:


    Thanks so much, you save my day ;)


    Have another question;


    file.php


    In template;

    HTML
    {includePHP file='file.php'}
    <div class="border tabMenuContent">
    <div class="container-1">
    <p>{@$some_variable}</p>
    </div>
    </div>


    I got some error;


    Quote

    Fatal error: PHP notice in file /path/to/my/root.com/www/wcf/templates/compiled/47_1_1_CustomPages.php (67): Undefined index: some_variable

    Sorry for my bad english :D

    Edited once, last by Ferdinand ().

  • I would suggest to use eventlistener instead of PHP includes, because PHP code inside a templates is a dirty solution. Templates are used to divide into code and output, where output is the template.

    MfG Markus Zhang (aka RouL)