There are entities:
- Category (blog)
- Page (blog)
- Product category
They should open a url that leads from the root, without a prefix of type 'catalog' or 'blog' etc.
for example: site/news/page-1
where category_id points to category news
In General, how to implement it ? (the generation of url parsing and routing)
My plan UrlManager
To create a table:
id | url | src_id | type
url - the full url from the root ( /news/page-1
src_id - the resource, which is due to open this link
type - the resource type enum ( 0 - page, 1 - blog-category, 2 - category 3 - goods), etc
Well, actually, to work with this table.
What do you say ?
Who faced prompt please how is better to implement it, what can be problem and etc?
Not too primitive, my version, not "vlob" does he ?