Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Changed routes for post and products back to using only slug without id's

givanz78cc20de2140
diff --git a/config/app-routes.php b/config/app-routes.php
index b93e477..26e85cc 100644
--- a/config/app-routes.php
+++ b/config/app-routes.php
@@ -84,8 +84,8 @@ return [
'/vendor/{slug}/#page#' => ['module' => 'product/vendor/index'],
'/vendor' => ['module' => 'product/vendor/index'],
'/vendor/#page#' => ['module' => 'product/vendor/index'],
- //'/product/{slug}' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&slug={slug}'],
- '/product/{slug}-#product_id#' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&product_id={product_id}'],
+ '/product/{slug}' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&slug={slug}'],
+ //'/product/{slug}-#product_id#' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&product_id={product_id}'],
//compare
'/cart/compare' => ['module' => 'cart/compare/index'],
@@ -101,7 +101,8 @@ return [
'/{language{2,5}}/manufacturer/{slug}' => ['module' => 'product/manufacturer/index'],
'/{language{2,5}}/vendor/{slug}' => ['module' => 'product/vendor/index'],
'/{language{2,5}}/vendor/{slug}/#page#' => ['module' => 'product/vendor/index'],
- '/{language{2,5}}/product/{slug}-#product_id#' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&product_id={product_id}'],
+ //'/{language{2,5}}/product/{slug}-#product_id#' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&product_id={product_id}'],
+ '/{language{2,5}}/product/{slug}' => ['module' => 'product/product/index', 'edit'=>'?module=product/product&product_id={slug}'],
//checkout
'/cart' => ['module' => 'cart/cart/index'],
@@ -141,12 +142,12 @@ return [
//post
//'/#year{4,4}#-#month{1,2}#-#day#/{slug}' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&slug={slug}'],
- //'/{slug}' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&slug={slug}&type=post'],
- '/{slug}-#post_id#' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&post_id={post_id}&type=post'],
+ '/{slug}' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&slug={slug}&type=post'],
+ //'/{slug}-#post_id#' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&post_id={post_id}&type=post'],
//page
//'/{slug}' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&slug={slug}'],
- //'/page/{slug}' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&slug={slug}&type=page'],
- '/page/{slug}-#post_id#' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&post_id={post_id}&type=page'],
+ '/page/{slug}' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&slug={slug}&type=page'],
+ //'/page/{slug}-#post_id#' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&post_id={post_id}&type=page'],
//multi language content - language code must be at least 2 characters
'/{language{2,5}}/' => ['module' => 'index/index'],
@@ -156,8 +157,10 @@ return [
'/{language{2,5}}/blog' => ['module' => 'content'],
'/{language{2,5}}/cat/{slug}' => ['module' => 'content/category/language'],
'/{language{2,5}}/tag/{slug}' => ['module' => 'content/tag/index'],
- '/{language{2,5}}/{slug}-#post_id#' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&post_id={post_id}'],
- '/{language{2,5}}/page/{slug}-#post_id#' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&post_id={post_id}'],
+ //'/{language{2,5}}/{slug}-#post_id#' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&post_id={post_id}'],
+ '/{language{2,5}}/{slug}' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&post_id={slug}'],
+ //'/{language{2,5}}/page/{slug}-#post_id#' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&post_id={post_id}'],
+ '/{language{2,5}}/page/{slug}' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&slug={slug}'],
'/{language{2,5}}/tag/{slug}' => ['module' => 'content/tag/index'],
'/{language{2,5}}/tag/{slug}/#page#' => ['module' => 'content/tag/index'],
diff --git a/install/sql/insert/menu/menu_item.sql b/install/sql/insert/menu/menu_item.sql
index 20fabd7..3b9e8d5 100755
--- a/install/sql/insert/menu/menu_item.sql
+++ b/install/sql/insert/menu/menu_item.sql
@@ -50,17 +50,17 @@ INSERT INTO `menu_item` (`menu_item_id`, `menu_id`, `type`, `url`, `parent_id`,
-- (47,1,'link','//github.com/givanz/Vvveb/discussions',44,null,0,1),
-- (48,1,'link','//dev.*.*',44,null,3,1),
-(49,1,'page','/page/contact-7',0,7,6,1),
-(59,1,'page','/page/about-11',0,11,1,1),
--- (60,1,'link','/page/contact-7',59,null,0,1),
--- (61,1,'link','/page/contact-7',59,null,3,1),
--- (62,1,'link','/page/contact-7',59,null,2,1),
+(49,1,'page','/page/contact',0,7,6,1),
+(59,1,'page','/page/about',0,11,1,1),
+-- (60,1,'link','/page/contact',59,null,0,1),
+-- (61,1,'link','/page/contact',59,null,3,1),
+-- (62,1,'link','/page/contact',59,null,2,1),
-(63,1,'page','/page/services-12',0,12,4,1),
-(64,1,'page','/page/pricing-13',63,13,0,1),
-(65,1,'page','/page/services-12',63,12,0,1),
-(80,5,'page','/page/marketplace-15',63,15,0,1),
-(66,1,'page','/page/portfolio-14',63,14,0,1),
+(63,1,'page','/page/services',0,12,4,1),
+(64,1,'page','/page/pricing',63,13,0,1),
+(65,1,'page','/page/services',63,12,0,1),
+(80,5,'page','/page/marketplace',63,15,0,1),
+(66,1,'page','/page/portfolio',63,14,0,1),
(67,1,'text','#',0,14,3,0),
(68,1,'text','#',67,11,0,0),
@@ -69,11 +69,11 @@ INSERT INTO `menu_item` (`menu_item_id`, `menu_id`, `type`, `url`, `parent_id`,
(51,5,'link','/',50,null,0,1),
(52,5,'link','/shop',50,null,0,1),
(53,5,'link','/',0,null,0,1),
-(54,5,'page','/page/shipping-delivery-8',8,8,0,1),
-(55,5,'page','/page/terms-conditions-9',9,9,0,1),
-(56,5,'page','/page/contact-7',0,7,0,1),
-(57,5,'page','/page/contact-7',56,7,0,1),
-(58,5,'page','/page/portfolio-14',56,14,0,1),
+(54,5,'page','/page/shipping-delivery',8,8,0,1),
+(55,5,'page','/page/terms-conditions',9,9,0,1),
+(56,5,'page','/page/contact',0,7,0,1),
+(57,5,'page','/page/contact',56,7,0,1),
+(58,5,'page','/page/portfolio',56,14,0,1),
(73,5,'link','/user/return-form',56,null,0,1),
@@ -86,7 +86,7 @@ INSERT INTO `menu_item` (`menu_item_id`, `menu_id`, `type`, `url`, `parent_id`,
(74,5,'link','/blog',50,null,0,1),
-(75,5,'page','/page/services-12',50,12,0,1),
-(76,5,'page','/page/about-11',56,11,0,1),
+(75,5,'page','/page/services',50,12,0,1),
+(76,5,'page','/page/about',56,11,0,1),
(77,5,'link','/brand',53,null,0,1),
(78,5,'link','/vendor',53,null,0,1);