K
K
Kirill Gorelov2018-03-20 16:53:16
1C-Bitrix
Kirill Gorelov, 2018-03-20 16:53:16

Bitrix, connect different templates for one product depending on the condition?

Guys, there is a task, you need to connect different outputs in the template for the same product, depending on the condition.
But the component should work the same.
Doing checks in the template itself and displaying it differently is not an option, the code turns out to be dirty and very cumbersome. How can I do that.
I found this

$this->IncludeComponentTemplate('имя_файла_нового_шаблона');

But I don't think it will fit.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2018-03-20
@Rema1ns

It's easier to create a folder in the template, for example, themes, create files with templates there, the template will include the desired "theme" according to your condition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question