Streamlining vars for titles and descriptions

Discussion in 'Developers' Forum' started by cfoe, Jun 22, 2012.

  1. cfoe

    cfoe ISPConfig Developer

    How about equalizing tmpl_vars for title and description in all templates?

    In *_edit.htm files (and the associated lang files) titles and descriptions are combined in <tmpl_var name="form_hint">
    In *_list.htm titles are "list_head_txt" and descriptions are "list_desc_txt"

    I would propose to change all sites to titles ="list_head_txt" and descriptions = "list_desc_txt"

    If you give me the go-ahead I will do the work and commit it to SVN.
     
  2. cfoe

    cfoe ISPConfig Developer

    As I extended my theme for 3.0.5 today I found this in interface/web/mailuser/templates/index.htm

    Code:
    <h2><tmpl_var name="page_head_txt"></h2>
    <p><tmpl_var name="page_desc_txt"></p>
    I do not see why we should not use the tmpl_var named "page_*_txt" in ALL template files.

    If I missing something tell me please :confused:
     
  3. cfoe

    cfoe ISPConfig Developer

    Some related question:

    Is there a difference? In template files.
    PHP:
    <tmpl_var name='btn_cancel_txt'>
    {
    tmpl_var name='btn_cancel_txt'}
    :(
     
  4. till

    till Super Moderator

    There is no differnce, the templating system supports {...} as well as <...> for variable placeholders.
     
  5. cfoe

    cfoe ISPConfig Developer

    What do you say to my previous post?

    I committed a lot of clean up tonight (couldnt sleep). Would be "no problem" to change the vars for title and description.
     
  6. till

    till Super Moderator

    The problem with this change is that it renders all translations invalid as the variable names of the texts are in the language files. mayn companys use their own language file sets which are not part of ISPConfig and we would break all their setups with the 3.0.5 update when we replace the current variable names with new ones.

    I think cleaning up is good but we can do this only if it will not break the installed systems. So we should use the new naming for new files only and levae the current files as they are.
     

Share This Page