My catalog structure is like that:
- Catalog
- - Category 1
- - - Category 2
- - - - Category 3
- - - - - Product 1
- - - - - Product 2
- - - - - Product 3
- - - - Category 4
- - - - - Product 4
- - - - - Product 5
- - - Category 5
- - - - - Product 6
- - - - - Product 7
- - - Category 6
- - - - Product 8
- - - - Product 9
- - - - Product 10
- - Category 7
- - - - Product 11
- - - - Product 12
- - Category 8
- - - - Product 13
- - - - Product 14
- - - - Product 15
What need to do with this plugin to make URL's like that?
/catalog
/* a list of main categories ONLY (1 7 8) */
/category1
/category1/category2
/* a list of subcategories ONLY (2 5 6, 3 4) */
/category1/category2/category3
/* a list of products in that category (1 2 3) */
/category1/category2/category3/product1
/* product details */
etc.
What need to do with this plugin to make meta_title & meta_description & h1 at this urls to be SEPARATED (category/product specific, but not always equal to page's title)?
What need to do with this plugin to make the breadcrumbs (plugin: mey/breadcrumbs) be like mentoined urls, e.g. "home / catalog / category 1 / category 2 / category 3 / product 1" ?
Sad day, please help.
Last updated
Hi,
You would have to use view overrides and make one categoy view override per page type you want to make.
But you would not be able to have urls like /category1/category2
if you also want to make content pages, because the system would not be able to make the difference between urls. Or you will have to add a parameter in urls for your content pages, like /content/:slug
Because OctoberCMS uses the :slug
(or anything else) parameter to get the dynamic url.
So you probably will have to make theses pages, with speific url parameters :
home.htm => slug : /catalog => component categories with override to display only categories of first level,
first-level-category.htm => slug : /catalog/:slug That would define your first level of categories => component categories with override to display only sub categories of :slug dynamic category,
second-level-category.htm => slug : /catalog/:cat/:slug => component product_list to display products of dynamic category :slug
I don't think you can get the breadcrumb from another plugin as it has to reverse from product. Maybe you can getall the url parameters and display them, so your urls could be like :
/catalog/:cat/:subcat/:product
So your breadcrumb would be :
Home > {{ cat }} > {{ subcat }} > {{ product }}
But I haven't tested it.
Last updated
sounds reasonable, but looks like bad design not to have page's hierarchy at CMS pages (at first look)
I ends up with two options:
- make static pages and menus and insert category/products list with slug filter but it's really painful to do with this magnificient October CMS (at first look, again)
- make things as designed with /cat/:slug /prod/:slug and rewrite/redirect it in outside layer
Hope in future i will/can do it/with laravel+october style and Octo will rule the Web
1-3 of 3