SimpleRain / SimpleOptions

A simple wordpress options framework for developers.
16 stars 2 forks source link

Submenu Items in Sidebar...Possible? #24

Closed ghost closed 11 years ago

ghost commented 11 years ago

Just checking out your fork of smof here, and like where you have gone with it! I was wondering if Simple Options has the ability to add submenu items in the panel menu/sidebar? And if so, how do you set those up?

The reason I ask is that it would really help to clean up the sidebar, especially for commercial themes that have a lot of options. For instance, I could have a menu item that says "Style Settings" and when clicked the menu would expand and have sub items of "Header Styles", "Content Styles", "Footer Styles", etc.

Anyways, is this possible with the framework as it stands now?

Thank you!

dovy commented 11 years ago

@WhatJustHappened I'm glad you like what you see. You really should download the demo theme here: https://github.com/SimpleRain/SimpleOptions-Test-Theme

Yes, it does that! I made SOF from the mindset of a premium theme developer. I really needed something solid for my themes.

Anyways, yes it as that and much more. I promise you'll like what you see. We're almost to v1.0.0 too. Probably early next week. ;)

ghost commented 11 years ago

@dovy Thank you for the quick response!

I have had some time to install and look over the test theme, and it works great, so I think I will go ahead and use this in the theme that I am developing in place of smof.

However, I was not able to find any evidence of the submenu items that I was referring to. I am not sure if I didn't explain well enough or if I am just confused, so please forgive me. :)

Just to be clear, by submenu items I am referring to on the actual options panel sidebar, not in the WordPress sidebar. For instance, in the test theme you have a menu item that says Styling Options, can I add children/sub menu items beneath that? So that when I click the Styling Options tab, it expands and those tabs become visible? How would I do that?

Example:

General Settings(no children)

Styling Options(with children)

Header Styles Footer Styles

Select Fields (No children)

Additional Fields(with children)

Image Options SEO Options

etc.

Again please forgive me if I am overlooking this, the rest of the options seem easy enough, this particular item has just stumped me. :)

Thanks again!

dovy commented 11 years ago

@WhatJustHappened Ahhh, I misunderstood what you were asking.

At the present, there's no implementation for "sub-sections". It wouldn't be TERRIBLE to implement that, but it would be a task.

I personally haven't seen a need for it. I know a few themes implement such an option. I think it would make things a little cumbersome when it comes to defining the fields.

If you can give me a logical use case, I may implement it. I just don't see it right now.

On that note I also haven't implemented grouping of fields. As this theme uses the full Wordpress Settings API, my hands are a little tied on that one.

ghost commented 11 years ago

@dovy Yeah, I figured it was a misunderstanding and I understand your reasoning for not implementing it.

I will just say that my interest in those as an option for people to use is that they keep the options panel looking much cleaner and more organized, in my opinion.

For instance, if you have ever looked at some of the more complex themes on Themeforest, some of them have so many menu tabs / "sub-sections" that they actually extend past the length of the options content page. I have seen this on a few of them. Many of the more popular sellers with custom options panels though do use these sub sections to better organize their options panels.

But from an organizational viewpoint, it makes sense, to me anyways, to structure the options panel like you would a website with a main page and then sub-pages that contain related settings. Much like a dropdown menu on a typical website.

This is one of the features that I like in both the Vafpress and Horizon options frameworks here on github. However, those frameworks have so many features aside from an options panel(shortcodes, metaboxes, etc.) that they are a bit cumbersome to use.

Thanks again for taking the time to answer my questions, and I appreciate all of the work that you have put into building a great options panel!

dovy commented 11 years ago

@WhatJustHappened Thanks for the kind words.

I'm not opposed to you tinkering with the code a bit and seeing what you can come up with. I actually haven't heard about Vafpress or Horizon at all. I'll take a look at those and see if I can come up with a more elegant solution for this.

I'm thinking maybe a section of type submenu? Buy oy, the pain.

ghost commented 11 years ago

@dovy FYI:

Horizon Framework https://github.com/joemckie/horizon-framework

Vafpress Framework https://github.com/vafour/vafpress-framework

I will be working with SOF this week, so if I can come up with a solution on my own I will let you know.

dovy commented 11 years ago

@WhatJustHappened Looked at both frameworks. Here are my thoughts.

Horizon

Can't say I'm that impressed with it otherwise.

Vafpress

All in all I like some of the concepts, but it lacks elegance somehow (in my eyes).

I really intend to expand options create metaboxes as well. I saw the submenus, but their way of doing it wasn't elegant at all. I actually thought it made it too confusing.

Anyways, my 2cents. Off to bed!

ghost commented 11 years ago

@dovy Pretty much agree on all points. Neither one really fit what I was looking for which is what led me to SOF.

Horizon is very "heavy" and slow loading, but I like the feature set of the options panel and the overall appearance I think is pretty nice. The transparent color is a nice option and I actually do like the idea of the user choosing the px, em, pt for typography as they may be more comfortable with one or the other depending on their background.

Believe it or not, there are quite a few people outside of the design/development fields that have no idea what a pixel is, pt would probably be easiest for most, but I personally never use that.

Vafpress, I don't particularly like the overall look/design of this framework. I agree that the submenus are confusing, I believe that is mostly attributed to the arrow direction when you select one, points up, which is odd. However, I do really like their binding fields, I think that they are very nicely done! I love the fontawesome selector and your idea is even better since I have been using the Elusive font icons lately in place of fontawesome :).