[solved] Style switcher movable?

Professional Jomal template designed to be easily adaptable to all kinds of business
GK User
Sat May 29, 2010 11:45 am
Hello,

is there a possibility the style switcher to move from bottom to top in the tools position?

Regards, Thomas.
User avatar
Junior Boarder

GK User
Sat May 29, 2010 2:27 pm
moving it to the tools position can be hard, because it needs a changes of the tools code (XHTML code and scripts), but of course it is possible and you have to move code from footer.php
User avatar
Administrator

GK User
Sat May 29, 2010 2:57 pm
Hi.
what i did:
In layouts/blocks/footer.php
I took the code
Code: Select all
   <?php if($this->_tpl->params->get('stylearea')) : ?>

   <div id="stylearea">

      <a href="#" class="style_switcher" id="style_switcher1">Red</a>

      <a href="#" class="style_switcher" id="style_switcher2">Green</a>

      <a href="#" class="style_switcher" id="style_switcher3">Blue</a>

      <a href="#" class="style_switcher" id="style_switcher4">Neutral</a>

   </div>

   <?php endif; ?>   
and put it in layouts/blocks/toolbar.php, just after
Code: Select all
<div id="gk-toolbar">   

Some style settings, and until now, works fine.
User avatar
Senior Boarder

GK User
Sat May 29, 2010 3:48 pm
Hello dziudek and julianeuropa,

thanks for your feedback.

I have put the code in toolbar.php - thanks for this workaround. :)

Regards, Thomas.
User avatar
Junior Boarder

GK User
Wed Dec 15, 2010 6:53 pm
Hi,

I am trying to move the switcher form the footer position to a module position. I know that Joomla will strip out the code if I add php to a custom module, so I found Jumi, but I get an error when I load the page after enabling the module. I don't have a toolbar position in my template (yourshop), and really just want ti as a module that I can enable, disable depending on what pages it's on.

Any help would be really appreciated.
User avatar
Junior Boarder

teitbite
Sat Dec 18, 2010 2:51 am
Hi

This can be relly problematic. I know it's possible but have not idea of a fast solution. Please try to put in the module only this part, but I ma not look exacly the same due to the position in code change:

Code: Select all
<div id="stylearea">

      <a href="#" class="style_switcher" id="style_switcher1">Red</a>

      <a href="#" class="style_switcher" id="style_switcher2">Green</a>

      <a href="#" class="style_switcher" id="style_switcher3">Blue</a>

      <a href="#" class="style_switcher" id="style_switcher4">Neutral</a>

   </div>
User avatar
Moderator

GK User
Sat Dec 18, 2010 8:06 am
Hi,

That was the first thing that I tried, which sort of worked, but only if it was also in the footer. However, because IDs are used instead of classes it was throwing a spanner in my validation.

Having said this I just went back and had the idea of removing the script from the footer. It still works! This is great because I haven't had much luck getting a positive response on a couple of forums.

A couple of style issues because it's in a new place but I think this one is fixed now!

TY, CB
User avatar
Junior Boarder

GK User
Sat Dec 18, 2010 8:44 am
can't you just set a negative value in pixels for the position? and then have it moved up ? i know it wont be like a module etc...
User avatar
Platinum Boarder


cron