Slideshow is vanishing, when I activate the Language Filter.

General questions regarding the use of languages in Joomla! 2.5.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
shirley87
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Oct 07, 2011 10:54 am

Slideshow is vanishing, when I activate the Language Filter.

Post by shirley87 » Fri Oct 07, 2011 11:04 am

Hi all,

Im using Joomla 1.7.1. and Im trying to build a bilingual site using template. The template has a slideshow that works in single language mode, as soon as I make my site bilingual the slideshow ot the homepage just vanishes.

Here is the live demo of my template: http://www.themegoat.com/j17/?template=jmint-tg
Here are the source files: http://www.themegoat.com/green-joomla-t ... mment-5943

Do you have an idea, how can I solve this problem? Or just any hints for me, where to start looking. On my website I did an default menu which is set to all, and two menus for both languages. Thank you very much !

Regards.
Last edited by shirley87 on Wed Oct 12, 2011 11:55 am, edited 1 time in total.

 
User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18920
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Slideshow is vanishing, when I activate the Language Fil

Post by infograf768 » Fri Oct 07, 2011 4:09 pm

The conditional to display the slideshow is not multilanguage aware.

<?php if ($menu->getActive() == $menu->getDefault()) { ?>

this code will always try to know if the active menu IS the default home page set to ALL languages.
It will not take into consideration a default home page set to a specific language.

I suggest you talk to the template developer.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

shirley87
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Oct 07, 2011 10:54 am

Re: Slideshow is vanishing, when I activate the Language Fil

Post by shirley87 » Fri Oct 07, 2011 4:36 pm

Dear Mr. Simonet,

many many thanks for the professional expertise of the problem ! Yes I would write to the autor of the template. Can you suggest me an (easy) way to change this, that I can handle by myself? If I understand you right, the template would not display the slideshow if this statement:

Code: Select all

<?php if ($menu->getActive() == $menu->getDefault()) { ?>
does not return true. I have some short questions:

1. Is getDefault() a joomla 1.7.1. funcion or it is a template function?
2. Where is the default page defined? May be in /template/mytemplate/index.php ?
3. What would happen if I delete this statement? May be the slideshow would appear in all pages?
4. Do you have some hints for me how to solve this problem? May be I have to do two slideshows one for each language, and then I have somehow to ask if this the default page for language 1 is and show the slideshow for language 1, or if the current page the default page for language 2 is and than to show the slideshow for language2.


Thank you very very much and have a nice weekend !
Regards.

shirley87
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Oct 07, 2011 10:54 am

Re: Slideshow is vanishing, when I activate the Language Fil

Post by shirley87 » Fri Oct 07, 2011 5:17 pm

Dear Mr. Simonet,

I have just tried to skip this if-statement

Code: Select all

<?php if ($menu->getActive() == $menu->getDefault()) { ?>
and the result is that the slideshow appears on every singe page.

Regards.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18920
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Slideshow is vanishing, when I activate the Language Fil

Post by infograf768 » Sat Oct 08, 2011 7:00 am

shirley87 wrote:Dear Mr. Simonet,

I have just tried to skip this if-statement

Code: Select all

<?php if ($menu->getActive() == $menu->getDefault()) { ?>
and the result is that the slideshow appears on every singe page.

Regards.
Indeed, this is why I wrote that some specific code has to be added to display the slideshow only when a default home page is active for any language, as it is the original idea of the template designer.

Try changing the line from

Code: Select all

<?php $menu = &JSite::getMenu(); ?>
<?php if ($menu->getActive() == $menu->getDefault()) { ?>
to

Code: Select all

<?php $menu = JSite::getMenu(); ?>
<?php $lang = JFactory::getLanguage(); ?>
<?php if ($menu->getActive() == $menu->getDefault($lang->getTag())) { ?>
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

shirley87
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Oct 07, 2011 10:54 am

Re: Slideshow is vanishing, when I activate the Language Fil

Post by shirley87 » Wed Oct 12, 2011 11:54 am

Dear Mr. Simonet,

I can not thank you enough for your help. It worked perfectly. I also builded in an if-else statemets on the page ID, so I can make the text on the slideshow bilingual. Thank you very much for the support. And I wish you all the best !

Regards

ltix86
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 09, 2014 10:15 am

Re: Slideshow is vanishing, when I activate the Language Fil

Post by ltix86 » Thu Jan 09, 2014 10:21 am

Dear Mr. Simonet and everybody,
congratulations for ypur job.

I solved the problem of the slidshow vanishing but now a blank space appears between the slideshow and the lower modules. If i return to the conditions of a non multilingual site this problem dissapears.
What could it be?
Thanks for your help,
Luca

 

Locked

Return to “Language - Joomla! 2.5”