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.
switch to page layout?
switch to page layout?
CMS Made Simple! Best CMS! 

- lollipop27
- Forum Members
- Posts: 237
- Joined: Wed Sep 12, 2007 4:09 pm
Re: switch to page layout?
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}
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?
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.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}
Template that underwent change.
CMS Made Simple! Best CMS! 

- lollipop27
- Forum Members
- Posts: 237
- Joined: Wed Sep 12, 2007 4:09 pm
Re: switch to page layout?
well that's what I thought. and these icons are linked with the same site. but pass some get values..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.
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?
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.
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.
CMS Made Simple! Best CMS! 

- lollipop27
- Forum Members
- Posts: 237
- Joined: Wed Sep 12, 2007 4:09 pm
Re: switch to page layout?
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...
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?
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?
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.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...
CMS Made Simple! Best CMS! 

Re: switch to page layout?
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
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?
Thx, but I dont need style switcher --> template switcher.
----
U mean to modify code this css switcher to my template switcher? Sounds good...
----
U mean to modify code this css switcher to my template switcher? Sounds good...

Last edited by requish on Thu Jun 03, 2010 4:22 pm, edited 1 time in total.
CMS Made Simple! Best CMS! 
