switch to page layout?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

switch to page layout?

Post 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.
CMS Made Simple! Best CMS! :)
User avatar
lollipop27
Forum Members
Forum Members
Posts: 237
Joined: Wed Sep 12, 2007 4:09 pm

Re: switch to page layout?

Post 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}
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: switch to page layout?

Post 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.
CMS Made Simple! Best CMS! :)
User avatar
lollipop27
Forum Members
Forum Members
Posts: 237
Joined: Wed Sep 12, 2007 4:09 pm

Re: switch to page layout?

Post 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.
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: switch to page layout?

Post 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.
CMS Made Simple! Best CMS! :)
User avatar
lollipop27
Forum Members
Forum Members
Posts: 237
Joined: Wed Sep 12, 2007 4:09 pm

Re: switch to page layout?

Post 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...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: switch to page layout?

Post 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...
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: switch to page layout?

Post 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.
CMS Made Simple! Best CMS! :)
JM6891
Forum Members
Forum Members
Posts: 150
Joined: Thu Mar 18, 2010 2:35 pm

Re: switch to page layout?

Post 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
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: switch to page layout?

Post 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... :)
Last edited by requish on Thu Jun 03, 2010 4:22 pm, edited 1 time in total.
CMS Made Simple! Best CMS! :)
Post Reply

Return to “Layout and Design (CSS & HTML)”