0
Welcome Guest! Login
0 items Join Now

How to set Preset Globally instead of per menu item?

  • How to set Preset Globally instead of per menu item?

    Posted 6 years 4 months ago
    • I'd like to allow my users to set their Gantry Preset cookie globally instead of on a per menu item basis. Currently, when they go to /pageone?presets=light, it will appear to change the preset to the "Light" theme on pageone and all other pages, but if they go to /pagetwo?presets=dark, it will change the preset to the "Dark" theme on pagetwo and all other pages, EXCEPT pageone, which will still have the Light Theme preset when a user goes back to it.

      I got around this by changing the getCookiePath() function in /libraries/gantry/core/gantry.php to just return '/', thus setting the cookie globally instead of per menu-item.

      If there could be an option added in the backend to toggle between saving presets globally (regardless of what menu they were triggered on), or on a per-menu basis (as they are now), that would be much appreciated over the core edit.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: How to set Preset Globally instead of per menu item?

    Posted 6 years 4 months ago
    • Gantry 4 won't be changed for this... All our development effort now goes into Gantry 5 and GRAV and the new templates.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: How to set Preset Globally instead of per menu item?

    Posted 6 years 4 months ago
    • Understood - is this functionality currently available in Gantry 5 or a planned addition?

      I've been holding out on switching to a Gantry 5 template until Joomla 4, but that still seems like a ways away at this point.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: How to set Preset Globally instead of per menu item?

    Posted 6 years 4 months ago
    • See the latest G5 template demo here for "Aurora" you can see how changing presets seems to work how you want there.

      http://demo.rockettheme.com/live/joomla/aurora/

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.047 seconds