Answer the question
In order to leave comments, you need to log in
CNC organization, CNC in kohana?
Previously, I had not come across the organization of the CNC (human-understandable url). In general, it seems to be clear, but I wanted to clarify some points. Perhaps I am mistaken and everything is organized much easier.
Now, for example, urls have a similar form, for example:
www.sitename.com/page/id
www.sitename.com/category/id
www.sitename.com/item/id
page , category , item - controllers. id - identifier.
I need to get url's like
www.sitename.com/nazvanie_stranicy
www.sitename.com/avtomobili_legkovye
www.sitename.com/kakaja-to_super_mashina
These routes are added by the author when adding material on his own.
It turns out that a URL table should be created, like
id - CNC identifier;
url - url string;
route - data about the controller, action, id;
state - state flag removed inactive, etc.;
url is a unique field, route is most likely also unique.
Accordingly based on the URL model table.
The question is at what point to intercept the url, work with the model, compare with the route? That is, how to correctly call this route by url.
Do I understand correctly that in this case, the pages on the site will be available at two urls?
Perhaps there are materials on this issue? Or modules that solve this problem regarding kohana framework .
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question