wet-boew / wet-boew-php

PHP variant of the Web Experience Toolkit (WET)
http://wet-boew-php.azurewebsites.net/demos-php/index.php
Other
24 stars 21 forks source link

Missing Support for language URL override in v4 #79

Open michael-milette opened 10 years ago

michael-milette commented 10 years ago

Hi @upsonp

In wet-boew-php v3.1, I could override the URL of the default language switcher using the following variables:

  $_SITE['gcwu_cmblang_href_eng']
  $_SITE['gcwu_cmblang_href_fra']

Could you please put back the ability to override language selection links in wet-boew-php v4 ? The 2 letter language code variation would be fine:

  $_SITE['gcwu_cmblang_href_en']
  $_SITE['gcwu_cmblang_href_fr']

Best regards,

Michael

upsonp commented 10 years ago

The variables are still there, if I understand what you're refering to, they're in the dist-php/config/config.php file as $_SITE['wb_cmblang_href_en'] and $_SITE['wb_cmblang_href_fr'].

you should be able to override them in your site specific config.php file. As an example from the demos-php/config/config.php file


    //$_SITE['wb_php_root'] and $_SITE['wb_core_root'] are set in the following file
    /* **************************************
     * The config-path.php file is intended to be used with the demos-php to
     * simplify deployment to various webservers. Change the $_SITE['wb_php_root']
     * and $_SITE['wb_core_root'] variables to point to the directory where
     * the /dist-php and core /dist folders respectivly exist
     */
     $_SITE['wb_php_root'] = "/wet-boew-php/";
     $_SITE['wb_core_root'] = "/theme-gcwu-fegc/dist/"; 

    //include the standard distribution config with the default settings
    include $_SERVER['DOCUMENT_ROOT'] . $_SITE['wb_php_root'] . "/dist-php/config/config.php";

    /*  Override variables from the dist-php config files here for the specific site */

    //modify to point to your sites search implementation
    $_SITE['wb_search_file'] = $_SITE['wb_php_root'] ."/demos-php/search/search.php";

    //enable if deployed from github. Comment out if demos deployed from zip file
    $_SITE['wb_site_href_en'] = $_SITE['wb_php_root'] . "/demos-php/index-en.php"; 
    $_SITE['wb_site_href_fr'] = $_SITE['wb_php_root'] . "/demos-php/index-fr.php"; 

--> //Modify the language selection link to point to whatever script suits your 
    //site or keep the default language script
    // ** This is the default language script set in the /dist-php/config/config.php file **
    //$_SITE['wb_cmblang_href_en'] = $_SITE['wb_cmblang_href_fr'] = $_SITE['wb_php_dist_folder'] . "/langselect/lang.php";

    $_SITE['wb_terms_href_en'] = $_SITE['wb_core_dist_folder'] . "/License-en.html";
    $_SITE['wb_terms_href_fr'] = $_SITE['wb_core_dist_folder'] . "/Licence-fr.html";
upsonp commented 10 years ago

@michael-milette Is this issue resovled?

michael-milette commented 10 years ago

Sorry, missed your reply. I'll download the latest and let you know.

upsonp commented 10 years ago

There's been quite a bit of restructuring for the variant to support themes. The directions given in the summary section on the wiki should work for setting it up.