Александр Христич 11 Posted March 18, 2022 Report Share Posted March 18, 2022 Здравствуйте. Есть категории статей и ,соответственно,статьи. В самой статье отображаются эмоции/реакции пользователей. Возможно ли вывести список этих эмоций/реакций вывести на странице категории? То есть Из статьи вывести в анонсе статьи в категории Обратиться Quote Link to comment Share on other sites More sharing options...
Кирилл 175 Posted March 18, 2022 Report Share Posted March 18, 2022 Здравствуйте. Вы можете вставить в шаблон код: {{if \IPS\IPS::classUsesTrait( $row, 'IPS\Content\Reactable' ) and settings.reputation_enabled}} {template="reputation" app="core" group="global" params="$row"} {{endif}} 1 Обратиться Quote Link to comment Share on other sites More sharing options...
Александр Христич 11 Posted March 18, 2022 Author Report Share Posted March 18, 2022 Кирилл Спасибо огромное. Если честно этот код вставлял,но он не работал....Оказалось что не в тот шаблон добавлял.. Обратиться Quote Link to comment Share on other sites More sharing options...
Александр Христич 11 Posted March 18, 2022 Author Report Share Posted March 18, 2022 Кирилл получилось вот так а чтобы глобально все не поменялось,создал два новых шаблона с нужными правками по аналогии reputation.phtml и reactionBlurb.phtml . Обратиться Quote Link to comment Share on other sites More sharing options...
Александр Христич 11 Posted July 5, 2022 Author Report Share Posted July 5, 2022 В шаблоне entry.html почему-то не работает этот код {{if \IPS\IPS::classUsesTrait( $row, 'IPS\Content\Reactable' ) and settings.reputation_enabled}} {template="reputation" app="core" group="global" params="$row"} {{endif}} Обратиться Quote Link to comment Share on other sites More sharing options...
Александр Христич 11 Posted July 5, 2022 Author Report Share Posted July 5, 2022 Все,разобрался,спасибо. Не указал переменную... Обратиться Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.