Page 1 of 1

switch to page layout?

Posted: Sat Mar 27, 2010 12:21 pm
by requish
Hello,

I do not know how it is called in English so I wrote here.

It's about a button on every page that allows you to switch the page layout from A to B.

For example, is a page where you can change the background color, as I am concerned about the entire look.

But leaving a navigational structure and link names, etc.

Has anyone met with something that already had the opportunity to do so may add-on?

Please advice and help.
Regards.

Re: switch to page layout?

Posted: Sat Mar 27, 2010 2:19 pm
by lollipop27
Is it just the css that changes or the entire template?
And does it have to stay once it is chosen?

If its just for one page you can give the link a GET-variable
so: index.php?page=xy&layout=a

And then you can change the css with smarty
{if $smarty.get.layout='a'}
load stylesheet for layout a
{else}
load stylesheet for b
{/if}

Re: switch to page layout?

Posted: Sat Mar 27, 2010 2:42 pm
by requish
lollipop27 wrote: Is it just the css that changes or the entire template?
And does it have to stay once it is chosen?

If its just for one page you can give the link a GET-variable
so: index.php?page=xy&layout=a

And then you can change the css with smarty
{if $smarty.get.layout='a'}
load stylesheet for layout a
{else}
load stylesheet for b
{/if}

Thanks for your reply. I care about the user to choose how he wants to look and feel (color, or business). Its will be some icons in the top of website.
Template that underwent change.

Re: switch to page layout?

Posted: Sat Mar 27, 2010 2:50 pm
by lollipop27
requish wrote: Thanks for your reply. I care about the user to choose how he wants to look and feel (color, or business). Its will be some icons in the top of website.
well that's what I thought. and these icons are linked with the same site. but pass some get values..
the ony thing is, do you want to keep that chosen site, when you change the page? then you'll have to add that get variable to the menumanager links.

Re: switch to page layout?

Posted: Sat Mar 27, 2010 4:04 pm
by requish
I modrewrite and this option with use index.php?page=xy&layout=a doesn't work.

I thought about use MLE for this purpose. But then its create a page with a parameter in the link /color/index.php and /business/index.php. I do not want to create a double content.

Re: switch to page layout?

Posted: Sat Mar 27, 2010 5:57 pm
by lollipop27
and how about writing it into a session.
then you could get it via the $SESSION variable and probabely it would be the best to write two UDT's.
One that writes the values into the SESSSION and anotherone that get's it and changes the css...

Re: switch to page layout?

Posted: Fri Apr 02, 2010 5:16 pm
by Dr.CSS
At first it sounded like you were looking for style switcher now I'm not so sure, but if it is then look at template manager module, not theme manage but template manager...

Re: switch to page layout?

Posted: Fri Apr 02, 2010 8:38 pm
by requish
Dr.CSS wrote: At first it sounded like you were looking for style switcher now I'm not so sure, but if it is then look at template manager module, not theme manage but template manager...
yes, I mean switch templates. The one where the user can switch the look from the front page. And to remember the ONLY choice in your computer.

Re: switch to page layout?

Posted: Thu Jun 03, 2010 2:26 pm
by JM6891
Hi there,

I used a style switcher for accessibility, so the user could increase the text size. Check out this post, it helped me a lot:

http://forum.cmsmadesimple.org/index.php?topic=8792.0

Re: switch to page layout?

Posted: Thu Jun 03, 2010 4:03 pm
by requish
Thx, but I dont need style switcher --> template switcher.

----

U mean to modify code this css switcher to my template switcher? Sounds good... :)