I was thinking about developing something cause i feel i need it, but first i would like to hear if there is something else like this out there already. Or if anyone think it would be interesting for them as well.
What i would need:
- When logging in as a special user - lets say admin - the plugin starts.
- The plugin looks in a named folder - maybe a media source.
- It starts at level one, adding that folder name as a category in modx.
- Any .html file in that folder it adds as a static chunk into the database. Then if there is a folder inside this folder, it adds a new subcategory and then looks inside this folder for html files. It would do the same for snippets.
I think it would a great way of not having to add chunks manually to the database through the modx. Doing that steal alot of time from me as a developer.
I would also like a function where i could list all chunks/snippets that are static and uncheck them. Instead of having to open each chunk/snippet and do it that way.
--------------------------------------
www.williamastrom.se
I think that would be better as a utility snippet or a Custom Manager page rather than a plugin. I don't think it would be too difficult to write, but I'm not sure how many people would use it. IMO, most people are not adding all that many new chunks.
I know customers aren't. But when i am developing projects i like to have static snippets and chunks to work on.
When setting up a website, there are always many chunks to create or overwrite. Just for a blog you need chunks for LatestPosts, Tag, ArticleRow, Archive Row, and so on. If they were already static or being created so i could more easily and fast update them with sublime or such external software. I always keep static templates, snippets and chunks cause when doing a lot of development and designing - editing these in the manager will end up cost me a LOT of time.
So it would better from my point of view to stay out of the manager as much as possible.
[ed. note: DesignByWilliam last edited this post 13 years, 6 months ago.]
--------------------------------------
www.williamastrom.se
many snippets have something like &tpl=`@FILE here/goes/your/file`
see getResources:
http://rtfm.modx.com/display/ADDON/getResources
when I'm building complex pages with lots of custom-coding I use bloX, where I can have a structured way to organize all needed chunks in the file-system.
Sorry, still not lots of documentation for bloX out there.
Thanks for you answer. Have never seen blox - will look it up.
But if i do define a tv that way, there is no way to allow the end client to be able to access easily through the manager if necessary unless i create the chunk and point it to the static file.
Will have a look at blox tonight!
[ed. note: DesignByWilliam last edited this post 13 years, 6 months ago.]
--------------------------------------
www.williamastrom.se
The description sounds very promising! Ill check it out!
--------------------------------------
www.williamastrom.se
FYI, ElementHelper is available via Package Manager, though you might not get the pull requests that way.
Yeah, got it and it works well! Also, my statement above regarding categories are wrong. They are created!
Ill save some time now:) I also saw Bob had released mycomponent. Gotta have a look at that. Could save me even more time. And if it does, ill ship you some $:) Seems like a lot of work into that one!
--------------------------------------
www.williamastrom.se
Quote from: DesignByWilliam at Apr 16, 2013, 02:53 PMI also saw Bob had released mycomponent. Gotta have a look at that. Could save me even more time. Seems like a lot of work into that one!
Yes, a little.