Make Snippets and Layouts tabs optional

Feed 13 posts, 4 voices

Avatar
486 posts

In order to reduce clutter and also make it easier for those of us who are currently using require statements to point to files in public/layouts and public/snippets, it would be nice if having Snippets and Layouts tabs in the dashboard are an option (perhaps set in admin/settings) rather than the default.

 
Avatar
343 posts

Hmm, I’m considering of redesigning the whole administration theme :D . So the tabs will be a little diferent. But it’s a good idea to make the whole navigation optional, so you can make only some tabs available. I think we can accomplish that with a plugin. And a new event in Frog :D

 
Avatar
651 posts

Gentlemen… I’ll have to place on some brakes here. I don’t want to annoy anyone, but there are too many things going on right now.

Before we do anything too drastic, I’d like to get to an actual 1.0 release of Frog.

Redesigning the administration interface and leaving out core functionality (snippets and layouts) is in my humble opinion quite drastic.

 
Avatar
486 posts

yeah of course these are just ideas being thrown out for consideration, so we all have plenty of time to consider the merits, the pluses and minuses. probably not the highest priority and no rush!

 
Avatar
651 posts

Okay, just so that we understand each other. ;-)

 
Avatar
486 posts

I just noticed something here playing around with Frog that the Files tab (File Manager plugin) will also allow you to edit layout and snippet files if you have them in your public/ directory. I think File Manager is one of the core plugins, if I’m not mistaken. So we do have some redundancy here and an opportunity to clear out some space. I’m not sure how often you guys edit your snippets and layouts through the GUI, but if it’s not that often then perhaps it would not make much of a difference for you to go into the Files tab and do it there.

If we can leave out the Snippets and the Layouts tabs it would open up more space for tabs that will probably be used more often (Comments, Events, Polls, Orders, Messages, Newsletters, etc — whatever people come up with).

If you think about it, it is sort of strange that snippets and layouts should have dedicated tabs but not stylesheets. Why are stylesheets a second-class citizen with respect to snippets and layouts? I think the proper solution is for all three of these to be dealt with via the Files tab (through Files Manager plugin). Failing that, perhaps all three (snippets, layouts, stylesheets) can be consolidated into one tab.

 
Avatar
651 posts

Snippets, Layouts and Stylesheets don’t necessarily belong together. I know that I have multiple snippets that I use for most of my layouts for example. The same goes for layouts and stylesheets.

Honestly, I don’t entirely understand why you’re so focused on removing the tabs and the functionality.

All you need to do (as I understand your requirement) is to prevent the tabs from being displayed. Something you can easily do with a couple of lines of CSS code in the admin theme.

The only thing we’d actually need to do would be to add an ID or CLASS to the snippets & layouts tabs in the admin screen HTML.

Or am I missing something here? :-)

 
Avatar
486 posts

All you need to do (as I understand your requirement) is to prevent the tabs from being displayed. Something you can easily do with a couple of lines of CSS code in the admin theme.

I haven’t checked the latest version but does Frog now look in public/layouts and public/snippets automatically? So that it’s not necessary to place a require statement into the form?

I suggested removing the two tabs because in another thread there was a concern that there was not enough space for tabs, and I think the interface can be improved by dealing with Snippets and Layouts in a different manner. But it’s not a big deal for me. It’s just a suggestion. If we can have Frog automatically recognize layouts and snippets in the public directory, then THAT would be awesome. That would make life easier. But removing the tabs isn’t going to make a practical difference for me.

I guess you guys use snippets, layouts and stylesheets in a different manner than I do, though. :)

 
Avatar
316 posts

The difference between Snippets, Layouts and Comments (as an example) is that, although the Comments plugin is included with the program to start, it is still just a plugin. Snippets and Layouts are part of the core functionality.

I personally use them both a fair bit. I also use the Comments plugin (backend) a fair bit too. I would prefer though, for organization purposes if for no other reason, to have all plugins listed under one tab, and even alphabetically at that. It’s just a grouping of common items into one location.

That does bring to mind another thing entirely. Plugin sorting. Can we make it alphabetical instead of the random assortment of “whatever order you turn them on in”? I probably shouldn’t ask this here, sorry for the hijack.

 
Avatar
651 posts

I haven’t checked the latest version but does Frog now look in public/layouts and public/snippets automatically?

Nope.. And at least for Snippets, it never will as far as I’m concerned. It might for layouts, but not before 1.0 if I have anything to say about it. There’s too much going on. :-)

So that it’s not necessary to place a require statement into the form?

No, it is still necessary to place the require statement. You’re using Frog in a manner in which it wasn’t intended. ;-)