Posted by klonos on March 8, 2010 at 4:39am
8 followers
| Project: | Switchtheme |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I use a number of themes during development, but I need only a couple of them available to the drop-down menu. Can we please have a 'Available in the drop-down menu' checkbox next to each theme name in addition to the custom label field in order to be able to do this?
#259926: Switch to non-enabled themes should be taken under consideration as well I think.
Later on, perhaps we can extent this to allow assignment/availability of each enabled + available theme only to certain roles.
Comments
#1
Perhaps if we set the label to
<none>the theme doesn't show on the drop-down? (the way block titles work for example)#2
That didn't work
#3
Can someone add a patch or write a bit of code to add an if statement that would remove any themes from the selection array that has a label of < none > ?
if label = '< none >', do not include the theme label in the array
As you can tell... I am not a developer. This would be a real big help to me right now.
Thanks
David
#4
This patch seems to work for me. The magic label "" is hard coded though.
Please note that it's against the 6.x-1.1 release and not the VCS (I don't have my usual set of dev tools on this machine).
#5
...magic label "<none>" is...
#6
Okay, this patch is a bit more sensible. It adds a function to check the user-assigned label; if it's "<none>", the theme is ignored (in the init function). It also factors out the list_themes() function call, so that a filtered list is returned for the randomiser and the form generator.
#7
Okay, this patch is a bit more sensible. It adds a function to check the user-assigned label; if it's "<none>", the theme is ignored (in the init function). It also factors out the list_themes() function call, so that a filtered list is returned for the randomiser and the form generator.
#8
The problem with this patch is that the inactive switchtheme themes, are also inactivated in the admin settings, so you can't see the '' themes to activate them if you need it at any time.
This patch adds some more code to solve that problem.
#9
Very interested in this! I want to create a high contrast theme and allow anonymous users to enable that theme using themeswitcher...
#10
Patch #8 seems working fine, thanks.
#11
Subscribing. I'd like to see this feature added.
#12
thanks enkara,
Big help for me!
#13
Subscribing.
This is important cause the module show even the admin theme in the list.