Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

{{if главная страница}}

Featured Replies

Качан не варит уже, но примерно так:

<html>
  <head>
  </head>
<body id='' class='ipsApp header5'>
<div class="main-content {{if in_array('header5', \IPS\Output::i()->bodyClasses )}}ipsHide{{endif}}">
      {block="Ваш блок"}
</div>
</body>
</html>

 

11 минут назад, andros0789 сказал:

я вам показал пример вывода и условия. если в боди есть этот класс то оно выведет этот блок

Если нет в body этого, то применится к div'у class

ipsHide

и этот div будет скрыт.

А для того чтобы в нужной странице добавить класс header5, Вам нужно прописать на нужной странице другой код (к примеру у меня в шаблоне краткой новости)
 

{{\IPS\Output::i()->bodyClasses[] = 'header5';}}

И при входе на страницу с новостями у вас будет добавляться class header5 в body.

Советы выше не особо дельные. Используйте:

 {{if (\IPS\Request::i()->url()->data['path']) == "/"}} 

                      {block="тут ваш блок или что то"}, или текст или html код итд

{{endif}} 

если включен мод реверт то нужно поменять

  • Author

Вот это похожу на верную логику)

Сейчас нет возможности проверить, с гет параметрами будет работать?

к примеру если урл будет сайт.ру/?from=yandex
будет также считаться за главную - или уже условие не сработает?

35 минут назад, demvlg сказал:

Вот это похожу на верную логику)

Сейчас нет возможности проверить, с гет параметрами будет работать?

к примеру если урл будет сайт.ру/?from=yandex
будет также считаться за главную - или уже условие не сработает?

Все что за / считается другой страничкой и не показывает контент там.

За доп информацией пишите в лс. Помогу если нужно)

  • Author
{{if (\IPS\Request::i()->url()->data['path'] == '/' and ! \IPS\Request::i()->url()->data['query']) or (! \IPS\Request::i()->url()->data['path'] and \IPS\Request::i()->url()->data['query'])}}
	код на главной, даже с /?...
{{endif}}

можно закрывать

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.