ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

CSS style switcher

September 29, 2011 10:38am

Subscribe [5]
  • #1 / Sep 29, 2011 10:38am

    TheBlackHole

    72 posts

    Hi all,

    I’m using the Ellislab CSS style switcher but it’s not working as I need it to.

    1. The forms action is “index.php” the instructions state…

    “You set up a form on your front page where the user chooses their skin and submits the form”

    ...but I need this to work on every page of the site. I tried using {site_url}/{segment_1}/{segment_2} as the action url but it didn’t work.

    <form action="index.php" method="post">
     <select name="css_skin" id="css_skin">
      <option value="1">Default</option>
      <option value="apples">Apples</option>
      <option value="oranges">Oranges</option>
      <option value="4">Pineapples</option>
     </select>
    </form>

    2. I’d like to use <button>‘s instead of a <select>

    Many thanks

  • #2 / Sep 29, 2011 11:46pm

    Dan Decker

    7338 posts

    TheBlackHole,

    For #1, the form must route through index.php. Using a different action URL is not a supported function. For #2, the plugin is looking for a POST value assigned to “css_skin”. If you wanted to use buttons, you would essentially need to make each choice a separate form, for example:

    <form action="index.php" method=“post”>
     <input type="submit" name="css_skin" id="css_skin" value="css_1">
    </form>
    
    <form action="index.php" method="post">
     <input type="submit" name="css_skin" id="css_skin" value="css_2">
    </form>
    
    etc.
  • #3 / Sep 30, 2011 8:50am

    TheBlackHole

    72 posts

    Ah ok, but something like

    {site_url}/index.php/{segment_1}/{segment_2}

    works by the looks of things.

    That in mind, is there a way to remove index.php once the page has reloaded?

    Thanks

  • #4 / Oct 03, 2011 1:32am

    John Henry Donovan

    12339 posts

    TheBlackHole,

    That in mind, is there a way to remove index.php once the page has reloaded?

    Are you removing it already via a htaccess?

  • #5 / Oct 03, 2011 5:28am

    TheBlackHole

    72 posts

    I sure am John : )

  • #6 / Oct 04, 2011 12:00pm

    Mark Bowen

    12637 posts

    Hi TheBlackHole,

    Are you using the standard ExpressionEngine method listed here or something else?

    Also is the switcher now working for you on all pages?

    Thanks,

    Mark

  • #7 / May 17, 2012 10:52pm

    Damien Buckley

    62 posts

    What was the final solution with this? I’m looking at using the stylesheet switcher for a site requiring heavy accessibility - so changing font sizes, contrast etc etc. Unless anyone has a bettert suggestion for use with EE2?

  • #8 / May 18, 2012 4:03am

    TheBlackHole

    72 posts

    I ended up with a php solution, PM me your email address and I will send it across at some point.

  • #9 / May 22, 2012 3:29pm

    Dan Decker

    7338 posts

    Hi Damien Buckley,

    Did you get in touch with TheBlackHole regarding his solution?

    Cheers,

  • #10 / May 22, 2012 6:38pm

    Damien Buckley

    62 posts

    Hi Damien Buckley,

    Did you get in touch with TheBlackHole regarding his solution?

    Cheers,

    Yes - havent had chance to look at it yet though. Any other suggestions I can take into account?

  • #11 / May 30, 2012 3:20pm

    Dan Decker

    7338 posts

    Hey Damien,

    Actually, any means of making CSS adjustments should work. For example, using JavaScript or jQuery to manipulate the font size is a viable option.

    What means have you investigated?

    Cheers,

  • #12 / May 30, 2012 10:03pm

    Damien Buckley

    62 posts

    I haven’t investigated anything yet tbh - its for a project I’m pitching for - I was mainly wanting to see if the issue with the built-in function was resolved?

  • #13 / Jun 01, 2012 2:13pm

    Shane Eckert

    7174 posts

    Hey Damien Buckley,

    Not that I know of. Please keep us posted if you hear from TheBlackHole.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases