Skip to content

armgit / Vvveb

Public Imported from GitHub
0

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

Added pages and common pages like home, blog, signup etc for url input autocomplete

givanz93b6e671f72b
diff --git a/admin/controller/content/autocomplete-trait.php b/admin/controller/content/autocomplete-trait.php
index 0c37611..dd5ec44 100644
--- a/admin/controller/content/autocomplete-trait.php
+++ b/admin/controller/content/autocomplete-trait.php
@@ -23,6 +23,7 @@
namespace Vvveb\Controller\Content;
use \Vvveb\Sql\categorySQL;
+use function Vvveb\__;
use Vvveb\System\Images;
use function Vvveb\url;
@@ -111,6 +112,25 @@ trait AutocompleteTrait {
$results = $products->getAll($options);
$search = [];
+ $pages = [
+ 'index/index' => __('Home'),
+ 'product/index' => __('Shop'),
+ 'content/index' => __('Blog'),
+ 'user/index' => __('User'),
+ 'user/login/index' => __('Login'),
+ 'user/signup/index' => __('Signup'),
+ 'cart/cart/index' => __('Cart'),
+ 'checkout/checkout/index' => __('Checkout'),
+ ];
+
+ foreach ($pages as $route => $name) {
+ if (stripos($name, $text) !== false) {
+ $url = url($route);
+ $search[$url] = $name;
+
+ break;
+ }
+ }
if (isset($results['product'])) {
foreach ($results['product'] as $product) {