Jump to content

Как проверить есть ли в url get запрос?


Recommended Posts

Вопрос такой.

{if $smarty.get.page }

{/if}

Тут к примеру условие если в запросе есть get со страницей. 

А как поставить проверку что если в get запросе есть что то из фильтра ( при фильтрации) ?

По факту нужно все страницы с фильтрацией собрать под это условие

Edited by megauser
Link to post
Share on other sites
{* отображение параметра page из URL ($_GET) http://www.example.com/index.php?page=foo *}
{$smarty.get.page}

{* отображение параметра "page" из формы ($_POST['page']) *}
{$smarty.post.page}

или если проверка в шаблоне то можно jq распарсить url в браузере и далее проверку на page

если в View то $this->request->get('page', 'integer');

если обработчик лежит в папке ajax  $simpla->request->get('page', 'integer');

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...