Answer the question
In order to leave comments, you need to log in
in in you need to insert the price immediately after the text , but not everything is so simple. To somehow explain what I need, here is the following pseudoc">
What should the condition look like in MODX for this?
In the chunk
in in you need to insert the price immediately after the text , but not everything is so simple.
To somehow explain what I need, here is the following pseudocode:<head>
<title>
if (tpl==12) {
"Ремонт за руб."
}
elseif (tpl==22) {
"Ремонт от руб." // а тут нужно поле первого дочернего элемента
}
else {
" " // пустая строка
}
Answer the question
In order to leave comments, you need to log in
All the suggested options are good, but I would advise you to use the Fenom template engine , which is in the pdoTools component .
As a result, right in the chunk, you can place something like this:
{var $example_title = $pagetitle}
{if $_modx->resource.template == 12}
{var $example_title .= " Ремонт за {$a4yProblemPrice} руб."}
{elseif $_modx->resource.template == 22}
{var $example_title .= " Ремонт от {$menuindex} руб."}
{/if}
<title>{$example_title}</title>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question