my little Page is growing and every day there is a new idea …
Can anybody here give me a tipp, how I can create a graphical structure of all used templates, snippets and so on?
I don’t mean a structure of the rendered website structure. I mean from the source code…
Thanks for helping
Do you mean which snippets are used in each template etc.?
Or just a list of all templates and snippets?
thanks for your fast reply.
I prefer your first question. I’m interested in the structure of use for example in a treeview.
Background: With new ideas comes new snippets as a child of an older one. I want to increase the reuse of made snippets and more standard. Now, I began to copy snippets and change only little things in it. My fear is that I will come to a wild growth in program routines and that the system of change will suffer.
Hm, I don’t know you would have to parse the template files, maybe do that on the command line although I’m not sure how you could follow nested snippets.
Here is an example. I made it with freemind. On that way I found some irregulations in the logic structure and it helped me to identifiy reusable code on one side and avoidable code on the other. I hope, it helps to understand my wish:
PS: MOD means Module, Arrows are the origin of the module, numbers describe the level
Hi, have you seen my chart? Have you any idea?
I’ve seen it, but I don’t really understand it. And I have no other idea than what I outlined above.
I would rather structure the snippets in subfolders to keep a better overview.
Hi. Ok, I unterstand. The file structure in my project is the structure of Kirby. It’s ok.
In this case, I liked to get a structure of the use and dependency of all files in the project.
I think that when the project gets bigger, avoidable multiple uses can happen. And it can also happen that similar or comparable modules are designed twice. And for this I am looking for a proof of use for the modules. This is similar to that in parts lists, where there is also a where-used list in assemblies. In my view, this is not an uninteresting point to pay attention to. I thought there might be a code like this on Kirby, similar to sitemap, but only deeper.
Nevertheless, thank you very much for your support.
do you know that you can separate snippets also in subfolder?
E.g. it will help you to get a better structure in your snippets.
Hi Jan, thanks for your reply.
My current structure is:
But, this is not the question. I try an example: You are manufacturer of shoes… many shoes, of course! And now, you want to know, in which shoes you are need the shoelaces with number 12345. How to you solve this problem?
a) You open each package of shoes in your warehouse and identify the shoelaces with the number 12345
b) You use SAP an make a query: “Show me a list of all shoes in my warehouse with the showlace number 12345”
c) Show me the structure of my warehouse.
I prefer answer b. The most of you took c before. Do you unterstand my question now?
It’s not a question of not understanding your requirement.
But you will have to come up with a solution for your problem yourself, because there is no out-of-the-box way to achieve this in Kirby (and probably not in any other CMS I know of). Or wait until someone with the same requirement creates a plugin (up to this point, no one has ever asked to have this).
Therefore, we always try to be helpful and offer alternative ways of achieving something. If that’s not for you, that’s fine, but it might help others to see that there are ways to structure snippets other than putting them all directly under snippets as one big list.
Of course, another option would be to manually keep track of your templates and snippets while you’re coding.
I have now understood that there is probably no solution in this context.
I did that with Freemind basically for the sake of clarity, but in fact it helped. It’s just done manually.
A file parser that reacts to “PHP” would probably be of interest here. I have now taken that with me as a solution.
One more word on your reaction: you will probably have had a bad day. We all do. I got to know the Kirby forum as a large and very pleasant environment for support. Unlike many other forums on the web. I would like to keep that to myself.
Perhaps my request motivates someone out there who sees a point in the task, especially when many developers are working on a system and the overview could get lost. Nobody is perfect, but the right tools can help.