Language selection module in Login or register position

GK User
Fri Jan 27, 2012 9:14 am
Hello,
could you please tell me if it possible to put the language selection module in the "login" or "register" position and how I could do it? Currently I´m working in this URL http://bit.ly/wBQ7TM.
Thanks in advance.
Kind regards.
User avatar
Fresh Boarder

GK User
Fri Jan 27, 2012 10:28 am
Hi,

Open file templateDetails.xml and insert/declare a new module position, let's say "mynewpos".
Code: Select all
<position>mynewpos</position>

The next step we need to load this module position at the same place with login/register.

Open file: \layouts\blocks\top.php

Add this code to bottom:
Code: Select all
<?php if ($this->countModules('mynewpos')): ?>
      <div class="mynewpos">
         <jdoc:include type="modules" name="mynewpos" style="gavickpro" />
      </div>
      <?php endif; ?>

Then assign your module to mynewpos position.
User avatar
Platinum Boarder

GK User
Fri Jan 27, 2012 11:44 am
Thank you very much for answering. I made the changes you propose and it works, but the flags are much lower than the logo. Is it possible to put the flags at the same level of the logo??, like the button "Register" or "login" in the demo.
I tried eliminating in templateDetails.xml and Top. php all the information on these modules, as a result the position "login" and "register" are no longer available, but it doesn´t work.
I´m still working in this URL http://bit.ly/wBQ7TM.
Thanks in advanced.
Kind regards
User avatar
Fresh Boarder

GK User
Fri Jan 27, 2012 11:49 am
Add this code to override.css (with css override mode enabled in template setting):
Code: Select all
.languages{
float: right;
margin-top: 25px;
}
User avatar
Platinum Boarder

GK User
Fri Jan 27, 2012 12:17 pm
It works!!.
Not only your templates are great, also your support is great.
Thank you very much Don!!
Kind regards
User avatar
Fresh Boarder

GK User
Fri Jan 27, 2012 12:19 pm
You are most welcome. Feel free to let me know if you need any other helps.

Have a nice day!
User avatar
Platinum Boarder

GK User
Sat Feb 04, 2012 11:34 pm
Hello,
can you tell me, how i can do the logo from the left to the right side (1002 px width) and in the front the login and register button.
If i expand the logo image to the full width, the login and register buttons will to get out of place.
see the picture
thx

Bildschirmfoto 2012-02-04 um 23.29.20.png
User avatar
Junior Boarder

GK User
Sun Feb 05, 2012 1:39 pm
Hi ideenraum ,

Can you please give me the link to your site?
User avatar
Platinum Boarder

GK User
Mon Mar 12, 2012 12:19 pm
I followed your instructions, but changing the top.php file, the template is no longer loaded.

This is the website address:
http://www.quadrantefranchising.com

This changed the code in top.php:

----------------

<?php

// No direct access.
defined('_JEXEC') or die;

$top_1_6_columns = $this->generateColumnsBlock(6, 'top', 'top1_6', 1);
$top_7_12_columns = $this->generateColumnsBlock(6, 'top', 'top7_12', 7);

?>

<?php if($this->modules('top1 + top2 + top3 + top4 + top5 + top6') && $top_1_6_columns !== null) : ?>
<div id="gkTop1" class="gkMain <?php echo $this->generatePadding('gkTop1'); ?>">
<?php foreach($top_1_6_columns as $column) : ?>
<?php if($column !== null) : ?>
<div id="gkTop<?php echo $column['name']; ?>" class="gkCol <?php echo $column['class']; ?>">
<?php $this->addCSSRule('#gkTop'.$column['name'].' { width: ' . $column['width'] . '%; }'); ?>
<div class="gkBoxWrap">
<jdoc:include type="modules" name="<?php echo $column['name']; ?>" style="<?php echo $this->module_styles[$column['name']]; ?>" />
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

<?php if($this->modules('top7 + top8 + top9 + top10 + top11 + top12') && $top_7_12_columns !== null) : ?>
<div id="gkTop2" class="gkMain <?php echo $this->generatePadding('gkTop2'); ?>">
<?php foreach($top_7_12_columns as $column) : ?>
<?php if($column !== null) : ?>
<div id="gkTop<?php echo $column['name']; ?>" class="gkCol <?php echo $column['class']; ?>">
<?php $this->addCSSRule('#gkTop'.$column['name'].' { width: ' . $column['width'] . '%; }'); ?>
<div class="gkBoxWrap">
<jdoc:include type="modules" name="<?php echo $column['name']; ?>" style="<?php echo $this->module_styles[$column['name']]; ?>" />
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

<?php if ($this->countModules('lingue')): ?>
<div class="lingue">
<jdoc:include type="modules" name="lingue" style="gavickpro" />
</div>
<?php endif; ?>

-------------------

What I'm wrong?

Thanks
User avatar
Senior Boarder

GK User
Tue Mar 13, 2012 1:14 pm
Hi piterdan,

I don't see anything wrong in the code, also I opened the site and saw it working, have you solved the problem?
User avatar
Platinum Boarder

GK User
Tue Mar 13, 2012 3:42 pm
No, I have not resolved the problem. I'm using the original top.php file, without modification, but if you want I can show you what happens.
However, in essence, as an active file top.php amended, appears only a bulleted list of the menu.

Thanks
User avatar
Senior Boarder

GK User
Wed Mar 14, 2012 12:40 pm
Hi, i'm having the same problem with this template on Joomla 2.5.2. I followed your instructions and added a "languages" position to the templateDetails.xml;
templateDetails.xml.jpg


Then I have added the new module at the end of top.php;
top.php.jpg


Now the menu is displayed without any CSS formatting and there is the following error:

Fatal error: Call to undefined method GKTemplate::countModules() in C:\xampp\htdocs\account\templates\gk_finance_business\layouts\blocks\top.php on line 41

Please advise. Many thanks!
User avatar
Fresh Boarder

GK User
Wed Mar 14, 2012 2:23 pm
Hi,

Please try this code instead:
Code: Select all
<?php if ($this->modules('languages')): ?>
<div class="lingue">
<jdoc:include type="modules" name="languages" style="gavickpro" />
</div>
<?php endif; ?>
User avatar
Platinum Boarder

GK User
Wed Mar 14, 2012 3:07 pm
Don Lee wrote:Hi,

Please try this code instead:
Code: Select all
<?php if ($this->modules('languages')): ?>
<div class="lingue">
<jdoc:include type="modules" name="languages" style="gavickpro" />
</div>
<?php endif; ?>


Thank you, the error is gone and the two flags are displayed now. However the position of the module is not at the top, near the "login" and "register" buttons, but at the bottom of the page, above the social icons (see attachment).
flag_position.jpg


How can I fix this, please? Thank you.
User avatar
Fresh Boarder

GK User
Wed Mar 14, 2012 4:37 pm
Later update: after enabling all modules in the template, this is the position of the flags in the layout.
flag_position2.jpg


The source code for the module is the following:
source-flags.jpg


How can I move the flags to the left of the "login" button at the top?

Many thanks.
User avatar
Fresh Boarder

GK User
Thu Mar 15, 2012 12:13 pm
Can you give me the link to your site to check then I can know how to deal with the change?

Thanks,
User avatar
Platinum Boarder

GK User
Thu Mar 15, 2012 12:31 pm
Hi, I've figured it out. In order to appear at the top, the languages module must be moved to a different layout block (from top.php to nav.php, between the code blocks for the logo and the register buttons).

Afterwards, I aligned the "lingue" class in override.css by using position "relative" and "top" and "left" attribute. Now it looks like this:
flags-fixed.jpg


Thank you for putting me on the right track here. I've learned a lot. Cheers! :)
User avatar
Fresh Boarder

GK User
Thu Mar 15, 2012 2:57 pm
I'm very glad to know that, you really did a good job :D feel free to let me know if you need any more helps.

Have a nice day,
User avatar
Platinum Boarder

GK User
Sun Mar 18, 2012 12:19 pm
I would love to solve this problem too, but this particular forum thread is a mess. It is impossible to follow any one discussion! There are solutions given, suchas "try this code" in between discussions in which it is not evident where this code comes from or is to be placed. I cannot tell it the technical response is to one approach or another.

Can this be cleaned up somehow so that it will be obvious to someone like me who comes in here WHAT is the workaround to the Language Selection issue. How do I get it to show up in the place of the LOGIN, (or beside it.) Which code / which files to edit ?

Sorry but I have spent 30 minutes looking at each post and I cannot figure out who is speaking to whom about what!
User avatar
Fresh Boarder

GK User
Sun Mar 18, 2012 3:16 pm
Hi Jamief,

So what's exactly your problem you want to resolve? Is it the same with this topic's subject? If so, try my first post which is very clear on how to create a new module position to show modules at the same place with login/register link which is at top of site https://www.gavick.com/forums/130/langu ... tml#p59828

Be more clear with me then I will be sure to give you exact solution for your case.

Cheers,
User avatar
Platinum Boarder

GK User
Mon Mar 19, 2012 5:11 pm
Don Lee wrote:Hi Jamief,

So what's exactly your problem you want to resolve? Is it the same with this topic's subject? If so, try my first post which is very clear on how to create a new module position to show modules at the same place with login/register link which is at top of site https://www.gavick.com/forums/130/langu ... tml#p59828

Be more clear with me then I will be sure to give you exact solution for your case.

Cheers,


That's the solution and now I can follow the thread. Thanks.
User avatar
Fresh Boarder

GK User
Tue Mar 20, 2012 11:50 am
Glad to know that, feel free to let me know if you need any further helps.

Have a nice day,
User avatar
Platinum Boarder


cron