+ Reply to Thread
Results 1 to 2 of 2

Thread: text_dir variable is out of scope

  1. #1

    text_dir variable is out of scope

    Hello Rudi,
    You have added two tpl files header.tpl and head.tpl in new 4.6+ versions.
    There are some problems with smarty variable scopes in them.

    header.tpl

    Code:
    Only registered members can view the code.
    head.tpl
    Code:
    Only registered members can view the code.
    variable text_dir looses its scope after include command in header.tpl
    You can put
    Code:
    Only registered members can view the code.
    after include command in header.tpl and it returns nothing.
    I think, it is a better approach if you move all variable assigns like text_dir (which you use them after include command) to header.tpl like below.

    header.tpl

    Code:
    Only registered members can view the code.

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,172
    Hello Bahram,

    Yes, this is kind of a bug and it will be reworked in the next version

    in the meantime, use {$smarty.const.RL_LANG_DIR}

+ Reply to Thread