Перейти к содержанию
Официальный форум поддержки Simpla

shesternin

Пользователь
  • Публикаций

    2
  • Зарегистрирован

  • Посещение

Контактная информация

Информация о вас

  • Фриланс
    Заказчик
  • Версия CMS
    1.x
    2.x
  • Откуда
    Нижний Новгород
  1. Решил проблему через роутинг в index.php: // Routing $url = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI']; if ( strpos($url, '?') ) { $url = substr($url, 0, strpos($url, '?')); } if ( preg_match( '/catalog\/([^\/]+)\/([^\/]+)\/?$/', $url, $matches) ) { $_GET['module'] = 'ProductsView'; $_GET['category'] = $matches[1]; $_GET['brand'] = $matches[2]; } else if($url == '/'){ $_GET['module'] = 'MainView'; }else if ( preg_match( '/catalog\/(.+)\/?$/', $url, $matches) ) { $_GET['module'] = 'ProductsView'; $_GET['category'] = $matches[1]; } else i
  2. // Routing $url = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI']; if ( strpos($url, '?') ) { $url = substr($url, 0, strpos($url, '?')); } if ( preg_match( '/catalog\/([^\/]+)\/([^\/]+)\/?$/', $url, $matches) ) { $_GET['module'] = 'ProductsView'; $_GET['category'] = $matches[1]; $_GET['brand'] = $matches[2]; } else if ($url == '/') { $_GET['module'] = 'MainView'; } else if ( preg_match( '/catalog\/(.+)\/?$/', $url, $matches) ) { $_GET['module'] = 'ProductsView'; $_GET['category'] = $matches[1]; } else if ( preg_match( '/products\/([^\/]+)\/?$/'
×
×
  • Создать...