Port project to kirby

Hello,

i recently started developing a new webapp that does some (fancy) comparisons. now that i started the project i had to realize that i messed it up. i just wanted to get started without knowing anything about unobtrusive or progressive coding. in fact i am a pretty bad coder and just start to get things in the right order. i don’t know if this is the right place to ask for insight on this topic, but i will just give it a try, so bear with me, please.

what i am looking for is to get the very basic understanding of how to set up the filestructure for this project and some extra notes from your place, if you don’t mind.

right now it looks like this:

http://www.rewow.de/videostreaming/ (it’s german, but you will get the idea if you click on filters or check the source)

 frontpage
           -> category 
                     -> article1
                     -> article2
                           -> each article has product-information attached to it, stored in a messy mysql db.

now in kirby i would create

-> frontpage
     -> category
          -> article1
          -> article2
                ...
          -> filter
              -> filter1
              -> filter2
           -> forum
              -> entry1

this is the way i imagine is no bad practice? having an url for each filter and doing an ajax search query for multiple selects in a php file or something? how would you do it?
now a function that is missing from the current installment is, that i can link from a categorypage to the filterpage and have some filters already active (e.g. “good camera” and “low power consumption”). this would also be solved with the mentioned search query(?).

thank you very very much for your time! i got more questions, but i this would mess the entire post up.
daniel

also, if you want to comment on the projects idea itself, you are very welcome!

May I ask what the category folder is for? Do you plan to have several such categories? Just a guess, but I don’t think this folder is necessary. You can assign a category to each article by creating a category field and later filter according to this category.

Also, there is no need to create folders for filters or rather, I don’t see how this would make sense anyway. Or are these supposed to be the scripts that are called by the ajax call?

The way to do that with Kirby would be to filter your articles by different parameters similar to how articles are filtered by tags, see here http://getkirby.com/docs/solutions/blog/tags

hello texnixe,

looks like i asked the right question. i knew i didnt get something right here. kirby felt so limited to me. as usual its me as the user who is limited.

question: if i just filter for a category within all articles, won’t the backend be totally messy?

i have to learn all of this now. i’ll be back!

thank you!

If you have hundreds of articles, you might be right that I can get a bit messy if you need to find and update your stuff regularly. So categories might make sense after all.

But the main point here is, - given Kirby’s flexibility - that there is often more than one way to achieve a certain goal and that the best way always depends on your project. To get the most out of it, I think that it is important to understand how Kirby works and then structure your site so that you can easily manage it.

As regards the filtering: It should be enough to put one ajax folder in the main content folder (which then translates to one ajax template) and find the right bit in it by a parameter that you send with your ajax call.