A
A
Alexander S2014-11-03 14:37:02
Kohana
Alexander S, 2014-11-03 14:37:02

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

1 answer(s)
K
krll-k, 2014-11-03
@alex_m_s

It became possible to use lambda functions back in 3.2, - if my memory serves me right, - well, php needs the appropriate

This is << all I can offer you>> - use the search!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question