ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Global variables in SNIPPETS (Multi language site)

January 12, 2011 7:05am

Subscribe [1]
  • #1 / Jan 12, 2011 7:05am

    Hi guys.


    I just found out this article about multilanguage site here: Multi language site alternative
    I am pretty excited.
    But I found out that this “global_vars” added into the index file like here:

    $assign_to_config['template_group'] = '';
    $assign_to_config['template'] = '';
    $assign_to_config['site_index'] = 'http://www.example.com/en/';
    $assign_to_config['site_404'] = '';
    $assign_to_config['global_vars'] = array(
        "country_code" => "en",
        "language" => "english"
    ); // This array must be associative 

    they do work in the templates or embedded templates, how it was described:

    
{copyright_{country_code}}

    {embed=includes/nav_{country_code}} 

    but they DOES NOT WORK if I put them into the SNIPPETS.
    
Is it true, or did I miss something?

    Thanks for answer.

  • #2 / Jan 12, 2011 4:55pm

    Ingmar

    29245 posts

    Global variable will not work in snippets, that is true.

  • #3 / Jan 13, 2011 5:12am

    Thanks for an answer.

  • #4 / Jan 13, 2011 4:13pm

    Ingmar

    29245 posts

    Sorry I have not better news. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases