0
Welcome Guest! Login
0 items Join Now

SOLVED Language dependent menu

  • Re: SOLVED Language dependent menu

    Posted 13 years 11 months ago
    • is there a solution for this problem in the Gantry Templates ?
  • Re: SOLVED Language dependent menu

    Posted 13 years 11 months ago
    • For all those that are trying to have different menus in each language they are using here is the patch .... that works for me ;)

      in the example i will use 2 Languages English and German
      first we take a copy of params.ini (templates/rt_maelstrom_j15 in my case)
      we rename it params-en-gb.ini (we edit the file and we change the line that says

      menu-type-fusionmenu-menutype=mainmenu >>> we put in mainmenu the menu we want for english (mainmenu)

      we copy again the params.ini to params-de-de.ini and we change the line
      menu-type-fusionmenu-menutype=mainmenu >>> to the menu we want for the german (mainmenude)

      now we have 3 params.ini files in templates/rt_maelstrom_j15
      we leave the original params.ini file because the changes we will do in the template from the administrator menu will change this file (RT super developers will solve this issue till 2013)

      now we go to
      /components/com_gantry/core/gantrytemplatedetails.class.php

      and we change the code

      function _loadParamsContent(&$gantry){
      $doc =& JFactory::getDocument();
      $parlng= $doc->getLanguage();
      $params_file = $gantry->templatePath.DS.'params-'. $parlng . '.ini';

      * we have to create 2 lines ($doc and $parlng)
      and we edit this line $params_file = $gantry->templatePath.DS.'params.ini';

      Be4 the edits

      function _loadParamsContent(&$gantry){
      $params_file = $gantry->templatePath.DS.'params.ini'; <auto itan to sosto kai to alaksa>

      After the edits

      function _loadParamsContent(&$gantry){
      $doc =& JFactory::getDocument();
      $parlng= $doc->getLanguage();
      $params_file = $gantry->templatePath.DS.'params-'. $parlng . '.ini';


      Thanks for your help jasperisu for making the Rotator and i got the idea.
      and ofcource our RT developers that solve our problems in no time ;)

      Now i think its Solved somehow...

Time to create page: 0.056 seconds