Visitors select layout. |
For a list of all requirements and guidelines pertaining to posting a new Help topic, please click here.
This Month's Contests | Staff Member of the Month | Hosts Looking for Hostees | Hostees looking for Hosts | BigBookofResources
Submission Guidelines
Visitors select layout. |
![]()
Post
#1
|
|
![]() o3o ![]() ![]() Group: Member Posts: 15 Joined: May 2008 Member No: 645,987 ![]() |
I'm using Zymic which allows use of PHP.
I'm currently about to create yet another (personal) website. I want there to be an option where visitors can choose a different layout for the site, and possibly the preference would be remembered for the next time they visited. Does anyone know the code? Or have a link that could tell me how? |
|
|
![]() |
![]()
Post
#2
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 ![]() |
I think you'd have to use Javascript for that. Maybe have the Javascript change the stylesheet URL to a different one when a user selects a certain theme and then set a cookie when they do, so if they refresh or go back or whatever, have the Javascript load the cookie which saved the stylesheet URL last selected.
I'm not sure about the code itself right now, because I got back from a bar and I'm awfully tired. Also, I think I'd rather use jQuery for this, if it's possible. Maybe I can post one tomorrow. |
|
|
![]() ![]() |