Styleswitcher?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Styleswitcher?

Post by Zeynab »

Hi,

is there a frontend styleswitcher available which works with the most recent CMSMS version (1.6)?

Cheers,

Zeynab
Last edited by Zeynab on Sun Jul 05, 2009 8:01 pm, edited 1 time in total.
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Re: Styleswitcher?

Post by Zeynab »

Hi again,

is there truly no styleswitcher available for version 1.6?

I searched the whole forum and documentation, but either code is outdated by 3 years and won't work or the relevant module (templatemanager) creates havoc with the site. I tried both.

I want the site I build to be fully accessible, including CSS for people with a variety of impairments. It's necessary to give them the possibility to switch to such styles which fit their problems without having to sign up as users. Accessibility is by now such a staple for CMS and blog systems that I didn't even think about checking. All other platforms have such modules or plugins, often built into the core already. I'm really astonished nothing such exists for CMS made simple.

So, is there truly no one who brought the old styleswitcher module up to date or capable of doing that?

Cheers,

Zeynab
goodfella1978
Forum Members
Forum Members
Posts: 13
Joined: Wed Sep 10, 2008 6:12 am

Re: Styleswitcher?

Post by goodfella1978 »

Hi Zeynab

I too was looking around for a CMSMS styleswitcher but I couldn't find one, other than the Templatemanager one that you mentioned, but I didn't like that either. It seemed too intrusive.

I settled for a separate styleswitcher javascript in the end, which works well. It's a bit annoying because you need to edit the alternative stylesheets separately from the CMSMS ones and also FTP them to the site so it's all very separate from the rest of CMSMS, but once it's done it's done and it works well.

Let me know if you'd like any more info on the solution I found. I've used it many times and people love it!

Cheers
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Re: Styleswitcher?

Post by Zeynab »

Hi Goodfella,

yes, I'd appreciate your help very much! I'm no coder, all I can do is implement existing code.

I am about to gather all CSS sheets into one already, as there are problems in IE with several sheets. So I'll be doing that stuff anyway and it will be easy to then add additional CSS for the alternatives.

I'm however at a loss as to how to bind them to the templates then and how to implement the switcher itself. I've no code handy for that.

Is there a website where I can see what you did hand-on?

Cheers,

Zeynab
goodfella1978
Forum Members
Forum Members
Posts: 13
Joined: Wed Sep 10, 2008 6:12 am

Re: Styleswitcher?

Post by goodfella1978 »

Hi Again

Take a look at this page: http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm

It should tell you all you need to know at the moment (but you can always pm me if you get stuck!)

The example shows different background styles that switch but you can switch anything on the page, be it text size, colour, font, images, whether to display or not etc. Basically anything you can put in a stylesheet you can change.

The only site of mine that runs on CMSMS and incorporates the styleswitcher is http://www.medicalmuseums.org/home/ which is as yet unfinished but there's no harm in looking and trying it out. It's only that one page.

To get it all working you'd need to place a link to the styleswitcher javascript file in the head of your templates (probably best to put in global metadata so that it appears on all pages) and then also add the following to the global metadata:

Code: Select all

<link rel="alternate stylesheet" type="text/css" href="small.css" media="screen" title="small" />
<link rel="alternate stylesheet" type="text/css" href="large.css" media="screen" title="large" />
These CSS files would need to be edited manually as they can't be added to the CMS Stylesheet area (as far as I know) because of the link rel attributes. So for the small one you'd set the font-size smaller, the large one you'd set the font-size larger and so on. You can set the links to control the size by adding these links:

Code: Select all

Text Size: <a href="javascript:chooseStyle('small', 3)" class="sizeone" title="Small text">A</a>
<a href="javascript:chooseStyle('none', 3)" class="sizetwo" title="Standard text">A</a>
<a href="javascript:chooseStyle('large', 3)" class="sizethree" title="Large text">A</a>
You mention problems with IE (Typical IE) and the way I get around that is using conditional comments in my templates like this:

Code: Select all

<!--[if lte IE 6]>
{stylesheet name='ie6'}
<![endif]-->

<!--[if IE]>
{stylesheet name='ie'}
<![endif]-->
And add the stylesheets with those names to your CMS but don't attach those ones to any templates.

Let me know if you need any help!

Cheers
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Re: Styleswitcher?

Post by Zeynab »

Hi Goodfella,

I'll be working on this this evening, and am probably bound to have more questions then ;-)

But thanks a mile, this is exactly what I am looking for!  ;D

Cheers

Zeynab
goodfella1978
Forum Members
Forum Members
Posts: 13
Joined: Wed Sep 10, 2008 6:12 am

Re: Styleswitcher?

Post by goodfella1978 »

You're welcome!

Good luck!

Chat soon.
Post Reply

Return to “Modules/Add-Ons”